I have to set the date in my datepicker in dd/mm/yyyy format. Whet I\'m trying to do, with Javascript is this:
var year = 2014;
var month = 5;
var day = 10
There is confusing when you are using data picker, for bootstrap datepicker you have to use following code:-
$( ".datepicker" ).datepicker({
format: 'yyyy-mm-dd'
});
and for jquery datepicker following code must be used:-
$( ".datepicker" ).datepicker({
dateFormat: 'dd-mm-yy'
});
So you must be aware which date picker you are using, that is ultimately solve your issue, Hope this hepls you.