asmaoui / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

Feature Request : for use of the Calendar in the Holiday Bookings sector #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Hey Kevin, Loving the calendar - sterling work.

I am a css designer & jquery noob working on a project for a holiday booking 
website and I have a feature request regarding the limiting of 
clickable dates on the calendar.

What I want to achieve is to have a drop-down combo box (number of nights) feed 
into the calendar (Holiday Start Date Selector) and limit the 
date a user can select based on the number of nights the user selected.

i.e : 

'A 3 night stay can only start on a Friday'

When the user chooses 3 nights from the <select> drop-down and then launches 
the calendar to select a start date for the 3 night holiday - The 
calendar will only allow the user to click on the Friday cells for the current 
month view. This behavior would remain when flicking through 
months. (See attached Image)

This would ensure that the resulting  'availability search' yields a positive 
result, as any other 3 night start day will never find any holidays.

I would like to have a set of rules that are fed to the calendar based on the 
selection in the <select>

For example;

3 nights - Must start on Friday
4 nights - Must start on Monday
7 nights - Must start on Saturday

and so on...

I am not sure how easy this would be to do, how it stands with request or if I 
can sponsor you to introduce new features.

I really want to continue using your calendar on the website as, quite frankly, 
nothing else comes close to it - especially with my funky re-skin! :)

This new feature I propose would increase usability as a holiday date selector 
hugely and would be greatly appreciated by not just me but many 
others I imagine.

Thanks for taking the time to read this

Martin Wharton
- martin.wharton@gmail.com

Original issue reported on code.google.com by martin.w...@gmail.com on 18 Dec 2008 at 6:36

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, this is not a defect report - i was too dumb to select 'Enhancement'

Original comment by martin.w...@gmail.com on 18 Dec 2008 at 6:38

GoogleCodeExporter commented 9 years ago
Hi Martin,

Thanks for your interest in the datePicker. You should be able to do what you 
need by
using the renderCallback like in this example:

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerCustomCellR
ender.html

You may need to re-initialise the datePicker with to set a new renderCallback 
though.
If you would like me to put together an example of what you are after then feel 
free
to sponsor me using the donation field on my website and I will see what I can 
do :)
You'll also need to tell me all of the options for number of nights in the 
dropdown
and the rules associated with each option...

Cheers,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 18 Dec 2008 at 8:21

GoogleCodeExporter commented 9 years ago
Nice one Kelvin,

We would really like to sponsor you if you can help us out with getting this 
feature working.
Could you drop me an email to my gmail account so we can get the ball rolling?

Cheers dude,

Martin

Original comment by martin.w...@gmail.com on 19 Dec 2008 at 3:26

GoogleCodeExporter commented 9 years ago
This was implemented a while back and the relevant example was sponsored by 
Martin
(thanks Martin!). Closing ticket now...

Original comment by kelvin.l...@gmail.com on 9 Feb 2009 at 4:15