user3092953 user3092953 - 1 year ago 132
Javascript Question

JS Datepicker Format

I have purchased a template which comes with a date-picker.

However I cannot change the format, its currently showing the date as

MM/DD/YYYY hh:ii
I want to change this to
(no time).

Here is the date picker:

<div id="minimum-dtpicker" class="input-group date">
<input type="text" class="form-control"><span class="input-group-addon"><span class="ti-calendar"></span></span>

And here is part of the

format : "DD-MM-YYYY",
locale: 'en-gb'

Any ideas why this is not working?

Answer Source

If it is using momentjs, you are able to specify the format as follows in their docs:

moment(<unformatted date goes here>).format("DD-MM-YYYY");