[Building Sakai] Sakai DeateTime Widget - lang-datepicker.js

Hugh Robinson hughr at stanford.edu
Fri May 2 16:44:30 PDT 2014


Hi,
I am attempting to implement the sakai datetime widget logic in samigo 
using the lang-datepicker.js .
Is there someone I can contact with regard to its operation.
I cannot get it to correctly parse the date-time string val using the 
parseFormat parm.
In stepping through the js everything looks good until  moment.js tries 
to parse the date string into a date object.

The script invocation is as follows:

<script type="text/javascript">
localDatePicker({
input:'#assessmentSettingsAction\\:endDate',
useTime:1,
val:"05/01/2014 11:10 PM",
ampm:1,
parseFormat: 'mm/dd/yyyy hh:mm TT',
  ashidden:{
month:"assessmentSettingsAction\\:endDate_month",
  day:"assessmentSettingsAction\\:endDate_day",
year:"assessmentSettingsAction\\:endDate_year",
hour:"assessmentSettingsAction\\:endDate_hour",
minute:"assessmentSettingsAction\\:endDate_minute",
ampm:"assessmentSettingsAction\\:endDate_ampm"
}
});

The parsed date displayed ends up being:  01/01/1900 12:00 am.

note: this sort of consrruct ( assessmentSettingsAction\\:endDate ) 
looks weird because I am having to get jquery to cooperate with jsf.

I have successfully implemented  my own version of the jquery datetime 
widget into samigo for coursework at Standford (unaware that sakai was 
doing the same for rest of the tools).
Instead  of contributing back our version for samigo, I wanted to try to 
implment sakai's lang-datepicker.js and contribute that back.

thanks,
Hugh Robinson
Stanford





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140502/2537379c/attachment.html 


More information about the sakai-dev mailing list