TheCoder4eu / BootsFaces

BootsFaces : the next gen JSF Framework
MIT License
71 stars 17 forks source link

Change b:datepicker date format #29

Closed tejacodebase closed 9 years ago

tejacodebase commented 10 years ago

< b:datepicker id="journeyDate" placeholder="Journey Date" value="#{openSearchController.otRouteBean.toTime}"/> The default date format date is mm/dd/yyyy.

I want to change it to dd/mm/yyyy.

I have used this JS. But no use.

< script> $('.datepicker').datepicker({ format: 'dd/mm/yyyy' }); < /script>

TheCoder4eu commented 10 years ago

Hi, sorry for not answering quickly but the team is working on the first opensource release of this library. Bootsfaces supports this, unfortunately we missed to document it. If you head to the datepicker page:http://www.bootsfaces.net/page/jquery-ui/datepicker.xhtml

and try the last example picking three dates and submitting you will get:

Date: 23/10/2014 converted with ...

You can see the whole page source here: https://github.com/TheCoder4eu/BootsFacesWeb/blob/master/web/jquery-ui/datepicker.xhtml

As you can see it is standard JSF. Regards

TheCoder4eu commented 10 years ago

Leaving issue open to remember to document well date conversion.

TheCoder4eu commented 9 years ago

The date Format as presented by the widget is driven by the locale.