Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to configure 12 hour format #62

Open
scottmascio2115 opened this issue Aug 9, 2015 · 2 comments
Open

Unable to configure 12 hour format #62

scottmascio2115 opened this issue Aug 9, 2015 · 2 comments

Comments

@scottmascio2115
Copy link

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
Copy link
Author

@alenteria
Copy link

alenteria commented May 17, 2016

@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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants