I'm a CF and JS newbie, so any help would be grateful.
I'm looking for some help on excluding dates from the jQuery datepicker.
The rules for excluding dates are a little complicated, at least to me.
The datepicker is used for choosing an earliest collection date, but the collection date is depended on when you placed the order within business hours.
It needs 48 hours minimum notice in general - easy to do with setting the minDate.
But it gets complicated with orders placed before & after 12pm, and orders placed at weekend.
The break down for earliest collection...
Monday before 12pm = Wednesday / after 12pm = Thursday
Tuesday before 12pm = Thursday / after 12pm = Friday
Wednesday before 12pm = Friday / after 12pm = Saturday
Thursday before 12pm = Saturday & Sunday / after 12pm = Monday
Friday before 12pm = Monday / after 12pm = Tuesday
Saturday & Sunday = Wednesday
Im new to JS, but I have the following code
Any help would be grateful.
... and the trailing comma you had after
Its working fine.
Ive got it in a JSfiddle and was trying to test each day by giving the dt variable a date value.
Im not getting the adjustment in the picker.
Regarding the element ID. I'm trying to implement a datepicker in a hosted ecommerce platform. I cant get full access to the code, but by creating an input with a value of EnterDate, I was thinking of identifying by that value. Its not ideal, but it sort of works.
Thanks for the tips also on my bad habits. I'll keep an eye on it.
Again, any help would be grateful.
Sorry, this was a double post
Sorry this was a double post.
|All times are GMT +1. The time now is 11:41 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.