Expand my Community achievements bar.

customize date/time field

Avatar

Former Community Member

Hi,

I'm thinking of changing the date/time Field to specific needs,  before I start if this object is script/customizable.

eg:

  1. is it possible to show the clickable symbole even when the focus is not set on the field?
  2. is the appearance of the calendar popup scriptable?
  3. is the icon which appears changeable?
  4. where should I start if I decide to create a custom field?

Workaround now:

I made a textfield + button which looks like the symbol of the popu pcalendar

and on click I hide those fields and set the dateField visible + setFocus on it.

problem I have to click once more on the symbol to open the calendar popup.

regards

Johannes

5 Replies

Avatar

Former Community Member

No - The symbol will only appear when the field has focus.

No - The appearance of the calendar is not exposed through script

No - This is hardcoded in the calendar control (same as number 2)

What you have described so far is what I would do.

Avatar

Former Community Member

thx paul,

concerning my workaround, is it possible in any way to avoid clicking 2 times in order to get the popup calendar?

and might it be a realistic idea implementing a custom Field type?

regards

Johannes

Avatar

Former Community Member

You should be able to fire the event that holds the code yourself by using objectName.execEvent("eventname").

Paul

Avatar

Former Community Member

hi paul,

this is the script which is executed by clicking on the fake button.

    helper.presence = "hidden";
    datum.presence= "visible";
    xfa.host.setFocus(datum);
    t.datum.execEvent("click");

but even if I fire the click event, the calendar does not open.

It only opens when I click on the additional symbol of the Date/Time field.

regards

Johannes

Avatar

Former Community Member

I assume that you are using the embedded calendar ...if so there is no way to get it to open unless you click on  that icon. I thought that you had created your own calendar thats why I said what I did. Sorry for the confusion.

Paul