View Full Version : Datepicker in a regular HTML form

26 Oct 2007, 9:58 AM
Bonjour my friends,

I need to see an exemple on how one can include a datepicker in a regular HTML form (just the date picker and no other EXTJS form object).

I have a text box, next to it a calendar icon. I would like to click on that icon and popup the datepicker to automatically fill the text box.

I am new to EXTJS and it's rather urgent.

Thank you in advance for your help.

26 Oct 2007, 2:08 PM

26 Oct 2007, 2:18 PM
Yes and thank you for your reply. However, in your exemple the "s.gif" image (the button you click to call the datepicker) is in the .js, what I am looking for is just a <img in the html you would click to popup the datepicker.

27 Oct 2007, 10:26 AM
From the lack of replies, it was either a stupid question or impossible to accomplish. Which is ? I noticed everything happened in .js with Ext.

28 Oct 2007, 1:38 AM
I am trying to learn Ext JS and had the same question a couple of days ago. Here is what I found somewhere on these pages:

var dtTest = new Ext.form.DateField({
name: 'dateField',
allowBlank: false,
format: 'Y-m-d',
cls: 'test'

and the HTML:

<form ...>
<input id="date-field" ... />

It works fine for me :) I had to adjust the CSS of my page somewhat though.


30 Oct 2007, 2:18 PM
Thank you very much.