Hello everyone
xojo
The present is to greet you and thank you for the provision of your time in the attention of the present:
I have a desktop system where you enter documents with dates dd/mm/yyyy format and it is very important the speed of entry or modification with the keyboard, I made a small class from a textfield, but I am not very convinced, I have drawbacks when the date entered is modified, especially when I delete the digits of the day or the month and move the “/”
some scope will be very appreciated to apply it to my system
I cannot talk for others, but I do not understand what the question is.
Can you be more specific on what help you are asking ?
PS: did you set a mask ? Argggh ! You do not even tell us what control you are using to allow the user to enter the date. TextField ? Special Canvas Class ? Other ?
If you use a TextField, are-you using a CueText (TextField1.CueText = "DD/MM/AAAA") ?
A mask in a Textfield is set as TextField1.Mask = "##/##/####"
what i did is create a class for textfield/textarea with a property DateYN. if the field is set to DateYN, on the lost focus of the event, i check if the field is “;” and then set it to current date in dd/mm/yyyy or mm/dd/yyyy. if user enter 0101, it is set to 01/01/2017. if user enter 010116, it is convert to 01/01/2016
I do the same as @Richard Duke - if speed is important, skip all the formatting and just let the user enter 2, 4, 6, or 8 digits and interpret them when they leave the field.