When I debug the website locally it's working fine, however, the website hosted in Azure is displaying yesterday's date. The Azure server is located in my own timezone.
I suspect it's using the UTC time, but shouldn't it just use the local workstation time since it's JavaScript?.
I've configured my JQuery UI datepicker like this:
var today = new Date();
$('.datepick').each(function () {
$(this).datepicker(
{
required: true,
message: "This is a required field",
dateFormat: 'dd/mm/yy',
minDate: today,
maxDate: addDays(today, 3)
});
});
My today
object is showing the current datetime, as expected.
However, the interface is showing yesterday's date:
I'm not sure why this is needed, but I solved it using
setDate
.