I am trying to collect a date from text boxes and then do a comparison on them. I am entering the dates in dd-MM-yyyy format, however when the comparison is running its running is in a MM-dd-yyyy format.
in my live application I am using a bootstrap datepicker to enter the date so the date entered will always be the correct format.
Ive looked here at W3 Schools and I have also tried looking at
var dt1 = d1.split(/\-|\s/)
var dt2 = d2.split(/\-|\s/)
dat1 = new Date(dt1);
dat2 = new Date(dt2);
dat1.format("dd-MM-yyyy")
but this also fails.
Any and all help very much appreciated.
thanks
Dateconstructor does not accept arrays as parameter!