I'd like to change the Default altFormat
, but I can't seem to get it to work.
$("#myFav").datepicker({ dateFormat: 'yy-mm-dd' });
$("#myFav").datepicker('option', 'dateFormat', 'yy-mm-dd');
I thought altFormat would work just the same?
I'd like to change the Default altFormat
, but I can't seem to get it to work.
$("#myFav").datepicker({ dateFormat: 'yy-mm-dd' });
$("#myFav").datepicker('option', 'dateFormat', 'yy-mm-dd');
I thought altFormat would work just the same?
Have you tried what the documentation says:
$('.selector').datepicker({ altFormat: 'yy-mm-dd' });
or
$('.selector').datepicker('option', 'altFormat', 'yy-mm-dd');
For both the dateFormat and the altFormat:
$('.selector').datepicker({ dateFormat: 'yy-mm-dd', altFormat: 'yy-mm-dd' });
This changes the dateformat in my application:
$("#startdate").datepicker({dateFormat: 'dd-mm-yy'});