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

Sam Ottenhoff ottenhoff at longsight.com
Mon May 5 05:51:10 PDT 2014


On Fri, May 2, 2014 at 7:44 PM, Hugh Robinson <hughr at stanford.edu> wrote:

>  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.
>

This list, sakai-dev, is the right place.


>  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.
>
>
My recommendation would be to deal with the datetime as an
ISO8601-formatted date and to let the Sakai datepicker do the localization
of the format for the user.

So instead of val:"05/01/2014 11:10 PM" I would do it like its done
in announcement/announcement-tool/tool/src/webapp/vm/announcement/chef_announcements-revise.vm:

parseFormat: 'YYYY-MM-DD HH:mm',
val: '2014-05-01 23:10'

If you still have troubles, please post your code here or attached to a
JIRA, and I will take a look.

--Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140505/c65f3050/attachment.html 


More information about the sakai-dev mailing list