Date Picker in Ext 1.0 Alpha 3
The DExt demo app now uses the very latest version of Jack Slocum's Ext 1.0 Alpha 3 code.
I don't know what Jack's timeline is for release of Ext 1.0 but it might take a while judging by the number of new additions in each revision of the "alpha" code. Not that I'm complaining — each addition and change just makes it so much more useful. Take the DateField element for example. Shown here.
To see it in action, open the DExt demo and login (Options "menu"). Then create a new ticket from the Create menu. You should see a "due by" date field with a picker.
Enabling this couldn't be easier. Simply add a normal Notes date field to your form and then enable the picker with the following JavaScript code in your "onload" event.
var date = new Ext.form.DateField({ format: DEXT.DATE_FORMAT, minValue: new Date(), minText: "Must be after today" }); date.applyTo('DueBy');
Just a couple of things to note:
- The field on the Notes form is called DueBy and has the same name applied to its ID property in the "advanced" tab (how I wish Domino would just do that for me!).
- The format config option takes its value from the DEXT NotesSession object I mentioned recently.
- This DATE_FORMAT property is calculated using this little trick which means it doesn't matter if the server is in the UK (d/m/Y), the US (m/d/Y) or in Europe (d-m-Y) as the format will match the server on which the database is hosted.
Jack seems very accommodating to suggestion. Following a post on his forum, where I brought the plight of the Domino developer to his attention, he not only fixed the issue but made the following statement:
There seems to be a lot of Domino developers using Ext so having a dedicated section makes sense. I will let everyone know when it is ready.
Now there's some good news - Jack is planning a Domino section to the Ext website/documentation. Lots of people went on to offer help in putting it together, which is promising.
Whatever you make of the whole Ext library there's no denying its potential value to us as Domino developers. I await his next release with baited breath.
very very nice. :)
I'm also an Ext/Dext enthusiastic! With my medium knowledge of Javascript, I managed do put the messageboxes inside a NSF! It's very cool!
Thanks Jake to your efforts to drive this hole new Dext world! After this, Domino will have the oportunity to have the coolest UI's on the net! Well... We will only need some cool (.net like) libraries/tools for charting! ;-)
I got this working also, thanks to your example demo, but I get a javascript error message on the form when it's open in read mode.
this.el has no properties
Field("WorkDate")ext-all.js (line 172)
onload(load )