Jump to content

[SOLVED] Selecting Multiple Dates


dbdummy

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";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.