tags:

views:

24

answers:

2

Hi,

the calendar offered by ExtJS is not very intuitive for entering a birthdate, is it possible to use three separate fields (year, month, day) connected to each other and submit to the server only one value which is a composition: YYYY-MM-DD?

Or is there any good way to get a nicer calendar for entering a birthdate in an intuitive way?

Thank you.

A: 

Why isn't the ExtJS Datepicker worth for entering birthdate? In which field do you think it isn't proper - year, month or day? Yes, it is not same as 3 drop down lists with year month and day, but it provides absolute usability with least amount of code to select a date.

Swar
I think it is because at first you see a grid with the days of the current month, when you click on the month at the top you get to a small window where you are supposed to chose month and year, left is month, right year. This is not very intuitive to me and I am afraid many of my users will be lazy and enter fake data. jQuery offers a more intuitive solution with month/year picker at the top of the table: http://jqueryui.com/demos/datepicker/#dropdown-month-year is there anything like this for ExtJS? Mixing up these libraries is such a good option :)
Danilo
I actually agree, that it would be nice i some occations to have the triple combobox for entering dates. Extending the current DatePicker cannot be that difficult, but I haven't tried ;)Never the less, I highly appreciate the current DatePicker :)
Chau
A: 

To answer your question as asked, you can use an xtype of "hidden" to send the date formatted how you wish.

Using a common blur event on the three dropdowns or textboxes you choose, you check to see if all three have been filled in and pass simple validation. you then set the value of the hidden field based on the format that you choose from the 3 separate fields.

It Grunt
I've come across this before btw and this is how we had to implement it. There was a business process for keeping each of the fields separate as a complete birthdate was not required to perform a search function.
It Grunt