Languages

Menu
Sites
Language
Access and use DateJS library in JQuery Mobile App

I read somewhere that DateJS available from http://code.google.com/p/datejs/wiki/APIDocumentation is part of JQuery Mobile.

This library is designed to make working with dates very easy and convenient. I created a web app project from the JQuery Mobile template but have problems accessing and using the date functions provided by DateJS.

For example, the following code from the library does not run:

var myDate = new Date();

myDate.clearTime(); // TypeError: 'undefined' is not a function

Does anyone know how to make this work?

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 Replies
Raghavendra Reddy Shiva
To use the DateJs library, firstly you have to download the "date.js" file from any of the below locations to your "js" directory of your web application. https://code.google.com/p/datejs/downloads/list https://code.google.com/p/datejs/ And then mention the below line in your html file (under other jQuery scripts) Now you can use the DateJs library methods. Also refer below location for using the other supported Cultures. https://code.google.com/p/datejs/