Jump to content


Photo

unidbdatetimepicker within unidgrid using mm/dd/yy & dd/mm/yyyy


  • Please log in to reply
8 replies to this topic

#1 demetris

demetris

    Newbie

  • uniGUI Subscriber
  • Pip
  • 9 posts

Posted 10 November 2017 - 09:59 AM

I need to run on the same machine 2  versions of the same application for different clients.

 

the one uses mm/dd/yyyy and the other dd/mm/yyyy

 

I do have a unidbgrid and in  it a date field edited by a unidbdatetimepicker.

 

 

The unidbdatetimepicker validates against the regional settings giving an error for the one with different format.

 

How can I get around this?


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3856 posts

Posted 10 November 2017 - 10:06 AM

Hi,

Which edition and build are you using?
  • 0

#3 demetris

demetris

    Newbie

  • uniGUI Subscriber
  • Pip
  • 9 posts

Posted 10 November 2017 - 11:42 AM

Personal 1416


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3856 posts

Posted 10 November 2017 - 11:49 AM

First of all please visit here:

http://forums.unigui...-email-address/


  • 0

#5 demetris

demetris

    Newbie

  • uniGUI Subscriber
  • Pip
  • 9 posts

Posted 10 November 2017 - 12:03 PM

Done!


  • 0

#6 demetris

demetris

    Newbie

  • uniGUI Subscriber
  • Pip
  • 9 posts

Posted 14 November 2017 - 10:32 AM

Any resolutions?


  • 0

#7 demetris

demetris

    Newbie

  • uniGUI Subscriber
  • Pip
  • 9 posts

Posted 20 November 2017 - 08:39 PM

how can I clone the 'OnCloseup" behavior in unidbdatetimepicker?


  • 0

#8 RobYost

RobYost

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 196 posts
  • LocationFlorida, USA

Posted 22 November 2017 - 05:14 PM

This is how I did it:

 

https://unigui.mirah...in_Local_Format

 

Basically, I  create a new copy of TFormatSettings and use their local setting in it.

 

Then I setup up some types of date formats:

MM/DD/YYYY

MM/DD/YY

etc.

 

Then I call fmtDate ( source is in the link)

 

and it changes MM/DD/YYYY to DD/MM/YYYY 

or MM/DD/YY to MM/DD/YY 

 

depending on what is in TFormatSettings

 

Let me know if you have any questions about the source in:

https://unigui.mirah...in_Local_Format


  • 0

http://unigui.mirahe.../wiki/Main_Page

Please add any utilities you think are useful. I will try to keep the wiki organized.


#9 demetris

demetris

    Newbie

  • uniGUI Subscriber
  • Pip
  • 9 posts

Posted 25 November 2017 - 03:32 PM

Looks Good Thanks!!!!!


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users