I am using admin lte date picker its by default date format is mm/dd/yyyy when i change date into dd/mm/yyyy format I unable to get right selected date,
Here js code that is used to call datepicker
$(function () {
$('#datepicker').datepicker({
format : 'dd/mm/yyyy',
autoclose: true
});
})
I always getting this date 01/01/0001 12:00:00 A.M.on changing format, How can i get correct date in dd/mm/yyyy format?
Don't write
yyyy
, write onlyyy
for year and notformat
usedateFormat
http://api.jqueryui.com/datepicker/#utility-formatDateor you can do it by attribute
data-inputmask="'alias': 'mm/dd/yyyy'"