Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a="24/05/2013";
- var b="26/05/2013";
- function dateCheck() {
- var fDate = new Date("24/05/2013");
- var lDate; = new Date("26/05/2013");
- fDate = Date.parse(document.getElementById("fDate").value);
- lDate = Date.parse(document.getElementById("lDate").value);
- if(fDate <= lDate) {
- alert("true");
- return true;
- }
- alert("false");
- return false;
- }
- function dateCheck() {
- var a = new Date("24/05/2013");
- var b = new Date("26/05/2013");
- var checkinDate = Date.parse(document.getElementById("checkinDate").value);
- var checkoutDate = Date.parse(document.getElementById("checkoutDate").value);
- return((checkinDate >= a && checkinDate <= b) &&
- (checkoutDate <= b && checkoutDate >= a) &&
- (checkoutDate > checkinDate))
- }
- function dateCheck() {
- var a = new Date("24/05/2013");
- var b = new Date("26/05/2013");
- var checkinDate = Date.parse(document.getElementById("checkinDate").value);
- var checkoutDate = Date.parse(document.getElementById("checkoutDate").value);
- return(( a > checkinDate && a < checkoutDate) &&
- (b < checkoutDate && b > checkinDate) &&
- (checkoutDate > checkinDate))
- }
- var fdt= new Date("20/02/2013");
- var tdt = new Date("10/05/2013");
- function validateFromAndToDate(fdt,tdt){
- var dt1 = dte1.value.substring(0,2);
- var mon1 = dte1.value.substring(3,5);
- var yr1 =dte1.value.substring(6,10);
- var dt2 = dte2.value.substring(0,2);
- var mon2 = dte2.value.substring(3,5);
- var yr2 = dte2.value.substring(6,10);
- var date1 = new Date(yr1, mon1-1, dt1);
- var date2 = new Date(yr2, mon2-1, dt2);
- if (date2<date1){
- alert("Date period must be within the given date!");
- return false
- }
- return true
- }
Add Comment
Please, Sign In to add comment