Jump to content


Photo

UniDateTimePicker and Numeric KeyPad


  • Please log in to reply
3 replies to this topic

#1 Volk65

Volk65

    Member

  • uniGUI Subscriber
  • PipPip
  • 43 posts
  • LocationMSK, Russia

Posted 04 February 2018 - 05:18 PM

Hi all!

 

If you enter a date on the numeric keypad at the national layout, instead of a "dot" ('.') prints a comma. And the date looks like this: 12,03,2018.

How can I replace the comma for a point?

Replacing key value in the event of OnKeyPress and Onkeydown will not work.

 

THX.


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4119 posts

Posted 05 February 2018 - 06:57 PM

Hi,

 

Can you try to use this approach ?!:

 

UniDateTimePicker -> ClientEvents -> ExtEvents -> function keydown:

function keydown(sender, e, eOpts)
{
    if(e.keyCode == 110){
        me = sender;
        e.preventDefault();
        me.setRawValue(me.getRawValue() + '.');
    }
}

Best regards,


  • 0

#3 Volk65

Volk65

    Member

  • uniGUI Subscriber
  • PipPip
  • 43 posts
  • LocationMSK, Russia

Posted 09 February 2018 - 04:30 PM

Yes! Teşekkürler :)


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4119 posts

Posted 09 February 2018 - 05:09 PM

Всегда рад помочь! :)


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users