![]() |
Using the calendar class for a date picker - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Using the calendar class for a date picker (/showthread.php?tid=8317) |
Using the calendar class for a date picker - El Forum - 05-13-2008 [eluser]meigwilym[/eluser] Hi, I'm building a accommodation booking app. The idea is after an accommodation type has been chosen, a calendar of available dates is displayed. This calendar should be easily browsed through to find an appropriate date. So far I've built a page to display a calendar, with the available dates as clickable links. Here the problems start. The accommodation type is in a hidden field on the page. If the user wishes to go to the next month, the links got to /booking/2008/06 where it shows a calendar for June 2008. However, I can't keep the accommodation type as a hidden field with this method. Would it be possible to stick the accom type in a cookie? And can I extend the basic HTML calendar to a user-friendlier JS calendar, using the js_calendar_pi plugin? Can this plugin be customized in the manner that I described above, with limited clickable dates? Thanks for any help (I'm desparate!), Best regards, Mei Using the calendar class for a date picker - El Forum - 05-14-2008 [eluser]Crimp[/eluser] This actually sounds like a job best suited for javascript and ajax. You can, however, store the accomodation type in a session value. This way the type follows the user around as he/she navigates. Using the calendar class for a date picker - El Forum - 05-14-2008 [eluser]nevsie[/eluser] from a quick scan - jquery datepicker is ideal for you... especially if you use the range option that allows you to pick two dates start and finish. http://docs.jquery.com/UI/Datepicker i am pretty sure you could populate this with prebooked periods as well, although i have not tried. Using the calendar class for a date picker - El Forum - 05-14-2008 [eluser]meigwilym[/eluser] Thanks for your help. I'll take a look at the jQuery datepicker, and using a session variable had not occurred to me - Thanks. After posting this I tried to think of other ways of presenting the data in a user friendly way. One idea I had was to show, say, the availability for the next 6 months, and able to choose from there. There would be an option to show the 6 months after that too. Any thoughts on this? Thanks again, you're making my life much easier! Mei |