Search

Dark theme | Light theme

April 28, 2008

Working with dates and date selection in Javascript

Timeframe is a calendar component to select a date range using dragging. The components is very easy to configure and use.

Stephen Celis, the author of Timeframe, also mentions Datejs. With Datejs it is very easy to handle dates in Javascript, which is normally something that is not so easy. With Datejs we can write stuff like:

Date.today().is().monday();
Date.today().add(5).days();
And we can parse text into Date:
Date.parse("next monday");
Date.parse("today");
This is very useful to let users enter dates in a free text format.