Reputation: 23
The date picker is declared as below
<sj:datepicker title="%{getText('Choose_to_date')}" value="%{#attr.endDate}"
Now, when the value passed is something like 09/01/2013 when the page loads it automatically changes to 01/09/2013 This behavior is not seen if the value being set is 09/28/2013 i.e. if the number representing day > 12, all works fine.
Printed the value of attr.endDate into the logs and it shows up correctly
Been stuck with this issue for a day now :-(
Upvotes: 2
Views: 639
Reputation: 3849
Add displayFormat
attribute:
<sj:datepicker title="%{getText('Choose_to_date')}" value="%{#attr.endDate}" displayFormat="dd/mm/yyyy">
Or whatever format suits you.
Upvotes: 2