[jboss-user] [JBoss Seam] - Re: selectDate & convertDateTime

damianharvey do-not-reply at jboss.com
Mon Aug 20 17:53:14 EDT 2007


If you are rendering the selectDate via an ajax call (eg. using ajax4jsf) then you will need to do a few javascript hacks. 

If this is the case for you then add this bit of Javascript to your page (it's taken from the selectDate javascript that is called when a page is loaded normally

  | <script type="text/javascript">
  | //<![CDATA[
  | //This script block is needed to set Seam Date picker defaults as they don't otherwise get set by AJAX call - only needed on pages where date picker is rendered via AJAX
  | var CAL_DAYS_SHORT = 'Su,Mo,Tu,We,Th,Fr,Sa';
  | var CAL_DAYS_MEDIUM = 'Sun,Mon,Tue,Wed,Thu,Fri,Sat';
  | var CAL_DAYS_LONG = 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday';
  | var CAL_MONTHS_MEDIUM = 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec';
  | var CAL_MONTHS_LONG = 'January,February,March,April,May,June,July,August,September,October,November,December';
  | var CAL_FIRST_DAY_OF_WEEK = 0;
  | var CAL_DATE_FORMAT = 'dd/MM/yyyy';		
  | //]]>
  | </script>
  | 
Cheers,

Damian.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076043#4076043

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076043



More information about the jboss-user mailing list