Unable to configure 12 hour format
scottmascio2115 opened this issue · 2 comments
scottmascio2115 commented
I am using Simple Form and cannot figure out how to set the time_picker to use 12 hour format rather than 24 hour format.
I have tried
$('.time_picker').datetimepicker({
pick12HourFormat: true
})
and
$('.time_picker').datetimepicker({
use24hours:false
})
The error I am receiving is 'option pick12HourFormat is not recognized!'
I additionally have tried to pass it as a data attribute with no luck.
scottmascio2115 commented
I also asked the question on Stackoverflow http://stackoverflow.com/questions/31908746/simple-form-and-twitter-bootstrap-datetime-picker
alenteria commented
@scottmascio2115
this work in my end.
config/locales/en.yml
en:
datepicker:
dformat: '%d/%m/%Y' # display format of the date (this is the default, can be ommited)
pformat: 'DD/MM/YYYY' # picking format of the date (this is the default, can be ommited)
timepicker:
dformat: '%R' # display format of the time (this is the default, can be ommited)
pformat: 'HH:mm a'
pformat: 'HH:mm a'