jsf - Changing first day of the week in PrimeFaces calendar -
hello using primefaces p:calendar
component, question how set monday first day of week, not sunday (default)?
code tag p:calendar
:
<p:calendar id="todate" label="#{msg.date_to_report}" value="#{dailycashierreport.todate}" showon="button" pattern="dd-mm-yyyy" />
for changing first day of week, set locale="en_gb"
p:calendar
component as:
<p:calendar id="todate" label="#{msg.date_to_report}" locale="en_gb" value="#{dailycashierreport.todate}" showon="button" pattern="dd-mm-yyyy" />
and define following javascript in template:
<script> primefaces.locales['en_gb'] = { firstday : 1 }; </script>
but, if want change language well, see reference link other available options.
Comments
Post a Comment