Jump to content

Recommended Posts

Hi

 

I am creating an events manager...

 

some of the events require the selection of multiple dates. I was planning on using a select box for the month and year, and a multiple select for the dates, but it doesn't work if the dates for the event is 'Oct 29, 30, Nov 2, 3' which is essentially how i want them displayed.

 

i searched for multiple days, multiple dates and a calendar select script but none of them were very fruitful or sparked an idea of how to do this. Does anyone know if perhaps i am searching for the wrong term?

 

thanks

barbara

Link to comment
https://forums.phpfreaks.com/topic/67241-solved-selecting-multiple-dates/
Share on other sites

How about a multiple select

<?php
echo "<select name='event_date' multiple size='10'>\n";
$date = mktime(0,0,0);
for ($i=0; $i<90; $i++)
{
    $d1 = date('Y-m-d', $date);
    $d2 = date('M d Y', $date);
    echo "<option value='$d1'>$d2</option>\n";
    $date = strtotime('+1 days', $date);
}
echo "</select>\n";
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.