Using Datejs with Ext JS 2.2

Recently on Twitter Matt Raible asked if anyone had ever used Datejs with Ext JS. I hadn't, but I love Ext JS and I really like the free-form dates that Datejs allows such as 'yesterday' or '5 years from now'.

Geoffrey McGill, one of the Datejs developers, had posted some code in late 2007 to get Datejs working with an older version of Ext, but it didn't work with the latest release of Ext, version 2.2.

It didn't take long to update Geoffrey's changes to work with Ext 2.2, and I've put a demo online along with the Ext override code.

The code will override properties of all Ext.form.DateField objects and allow you to use the Datejs syntax. If this isn't the behavior you want you can easily extend and create your own class using Ext.extend.


© 2007-2012, Corey Gilmore | Posts RSS Feed | Comments RSS Feed | Contact

 

The views expressed on these pages are mine alone and not those of any past or present employer. All information presented on this site was obtained lawfully and not through disclosure under the terms of an NDA.