Hi,
I'm trying to authorise only certain dates in calendars with the date plugin to select a stay duration.
As I said in another thread, I'm using 2 date plugins: one for the arrival date and one for the departure.
I would like to disallow all dates before the next saturday for arrival and allow only saturday and sunday for arrival and departure.
For departure, all dates before the next saturday after arrival (1 week later) need to be disallowed too.
I learned http://fabrikar.com/forums/index.php?wiki/date-element/ and was able to disallow all dates before today with JS :
Using
I can deactivate dates before those for arrivals and departures.
Now I don't understand how to allow only saturdays and sundays for arrival and departure.
How to customize the sample code for
Thanks in advance
I'm trying to authorise only certain dates in calendars with the date plugin to select a stay duration.
As I said in another thread, I'm using 2 date plugins: one for the arrival date and one for the departure.
I would like to disallow all dates before the next saturday for arrival and allow only saturday and sunday for arrival and departure.
For departure, all dates before the next saturday after arrival (1 week later) need to be disallowed too.
I learned http://fabrikar.com/forums/index.php?wiki/date-element/ and was able to disallow all dates before today with JS :
Code:
var diff = new Date().compare(new Date(date));
var result = diff < 0 ?true : false;
Code:
var diff = new Date(this.get('value')).compare(new Date(date));
Now I don't understand how to allow only saturdays and sundays for arrival and departure.
How to customize the sample code for
Only allow the last Thursday of the month or Only allow the second Thursday of the month
Thanks in advance