Expand my Community achievements bar.

DateTimeField and an additional TextField

Avatar

Former Community Member
I have a combination of a textfield and a datetimefield. The user can select any date in the textfield and he can choose a date from the calendar. When the user select the date via the calendar the value of the textfield will be set to the selected date. Now my problem: how can I make the picker (the dropdown arrow) of the calendar visible when clicking the textfield? My first try with execute the click-event of the dattimefield wasn't successful. Anybody experiences or suggestions?
3 Replies

Avatar

Former Community Member
The only time the dropdown arrow will become active is when focus is put onto the field. Obviously you cannot have focus on the DateTime Field while you are filling the other field so I do not see how you can do this. You can however put focus on the DateTime field on exit of the text field by either modify the tabbing order or adding script to the exit event of the TextField. You would add this code:



xfa.host.setFocus("FieldName");



Hope that helps

Avatar

Former Community Member
Unfortunately not, the focus is on the DateTime field but the picker is not on.

Another question surrounding a DateTime field and patterns: how can I realize a date 03/2008 or 01/03/2008 with patterns: I've tried several that don't worked: "date{DD/MM/YYYY}|date{MM/YYYY}", "[DD/]MM/YYYY".

Do you have any experiences or suggestions?

Thanx

Avatar

Former Community Member
I just tried this and it worked fine for me .....



I used a pattern of date{MM/YYYY}



Make sure you put it on the display pattern (thats the pattern that is applied when the date is displayed)



Also when I put the cursor into the Date field (programmatically) the little arrow does appear.