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" /> 

reference image

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.

reference link


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -