Expand my Community achievements bar.

Date/Time field object with fixed "drop down button"

Avatar

Level 8
Level 8
Hi all,



I am trying to satisfy a customer which wants the drop down button that appear when you click inside the date/time field to be there always, not just when the user clicks inside the field. Can this be achieved and in this case how?



Thanks in advance



Sincerely

Kim
4 Replies

Avatar

Former Community Member
Nope ...the drop down button will only appear when there is focus on the field. That is the way the control works.

Avatar

Former Community Member
Hi, I wanted the button always visible too but I couldn´t do it so far ... also, talking about date field, I´ve been trying to lock the field so it can be edited by clicking the dropdown button only, and not by keyboard input...

I have been trying many things on the 'change' event but I still need the script to capture keyboard events ( for what i have found out, theres only a command to detect arrow key actions when you are inside a dropdown menu, but this is useless)



anyone has managed to do this?

Avatar

Former Community Member
ok, problem solved, didnt know the 'newText' property:



just writing this on the change event of the date field:



//-----------------

if (xfa.event.newText != null && xfa.event.newText != "")

{

var filter = /^[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]$/;

if (!filter.test(xfa.event.newText))

xfa.event.change = limpito();



}



function limpito(){

xfa.event.newText = "";

}

//----------------



cheers.

Avatar

Level 8
Level 8
Hi again Paul,



That is just a pity that you can't have the drop down button there always, however I have to deal with it in some other manor then.



I would really like this to be changed some day :)



BTW: Senators rule...



Sincerely

Kim Christensen

Dafolo A/S

Denmark