I have a datetimepicker -jqueryui, just wondering if is it possible for me to check if the date selected is a weekend or public holiday. If its a public holiday,can I have like a text file with a list of public holidays that it can cross check with.
I would like to have something like this.image1.png
The from and to time is enabled with datetimepicker and the "hour difference between the from and to time" calculated will be entered into the overtime total hours. If the date selected is a normal day, it will send the value to the normal day textbox, if its a weekend, it will send the value to the rest day textbox and if its a public holiday, it will send the value to the public holiday text box.
You can use the Date() function to determine weekends...
var then = new Date(2013,2,2); // a Saturday (March 2, 2013)
alert(then.getDay()); // show 6
then = new Date(2013,2,3); // a Sunday (March 3, 2013)
alert(then.getDay()); // show 0