Jump to content

Clear Button


Aggie85

Recommended Posts

Hello @Sherzod,

I tried this:

...
     if Self.Components[i].ClassType = TUniDBDateTimePicker then
        with TUniDBDateTimePicker(Self.Components[i]) do
          if ClearButton then
            with JSInterface do
              begin                      
                JSAddListener('afterrender', 'function(cmp){cmp.getTrigger("clear").hide()}');
                JSAddListener('focus', 'function(cmp){if (cmp.getValue()!="") cmp.getTrigger("clear").show()}');
                JSAddListener('blur', 'function(cmp){cmp.getTrigger("clear").hide()}');
                JSAddListener('dirtychange', 'function(cmp){cmp.getTrigger("clear").hide()}'); //<--------
              end;
...                                                                                                           

But got this:

image.png.06e22037ddd8683193d8c031c49cebaf.png

I would like to implement "dirtychange" for the field with "ClearButton = True"

is this possible with DateTimePicker?

Thanks,

Frances

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...