With the eternicode bootstrap-datetimepicker today uses MM/dd/yyyy.
How do I set datetimepicker to use dd/MM/yyyyy so that it highlights today correctly?
E.g. today is the 1st April , not 4th January.
As per the documentation, just set the format
property.
See the configuration section for different ways of setting options. For example (using datetimepicker
instead of datepicker
):
$('.datetimepicker').datetimepicker({
format: 'dd/mm/yyyy',
})
I would be wary of setting a specific format explicitly though - it would be better to honour the user's culture settings, unless you know for sure that all your users are happy to use the same format.
See more on this question at Stackoverflow