126
rated 0 times
[
132]
[
6]
/ answers: 1 / hits: 20587
/ 9 Years ago, thu, march 12, 2015, 12:00:00
I want to use Twitter Bootstrap's datepicker. I want the actual input to DISPLAY in the format mm/dd/yyyy but the value of the object I want it to create/pass should be in yyyy-mm-dd. I am aware of this property:
data-date-format => mm-dd-yyyy
But that changes both the way the date is displayed and how the value is formatted. I also have this in my JS:
$(this).datepicker({
format: 'yyyy-mm-dd',
autoclose: true,
todayHighlight: true,
pickTime: false
});
I'm not really sure what the format part is doing, but changing it doesn't change the value that is created by the input.
More From » twitter-bootstrap