mierlp Posted November 29, 2012 Posted November 29, 2012 Hi, Within my apps i use MyDac components voor database access and so also the query components. The query components contains the fields and is use 2 time fields On a field it's possible to set the DisplayMask (HH:mm) for time and EditMask (99:99) Then i use the OnSetText event for this field with the following code: procedure TdmArtist.ArtistStageTimeStartSetText(Sender: TField; const Text: string); begin if trim(Text)=':' then Sender.Clear else try Sender.AsDateTime:=StrTotime(Text); except // custom message when the time is invalid raise exception.Create('"'+text+'" is not a valid time or time format!'); end; end; Normally on standard Delphi applications it works. With uniGui i dont get the display/edit mask on a uniDBEdit component. How can i create a edit mask for time and check if it's a valid entered time. Regards Peter Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.