Hi everythings,

I have a question regarding on disabling today date on datepicker, i got this code from internet and it seem like working , but then i realised its starting disable today date from 08:00 am onward and not disable from 12:00 am, seems like its has problem with time zone, i guess.

$('.datepicker').datepicker({
format: 'dd-mm-yyyy', 
startDate: '+1d',
endDate: '+5m',                              
beforeShowDay: renderCalendarCallback               
});

Does anyone can explain me why this thing happen? TQ in advance.

I didn't do a deep inquiry but think it could be the old GMT vs Local Time issue again. Think about your number of hours difference from GMT.

Quick fix may be to add 2d or put an if statement to use 2d if after 12AM.

commented: ok ill try that way first. tq for reply +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.