Is there anyway to manipulate the two digit year range in servoy?
Currently, using servoy 4.1, it converts any two digit years greater than 30 to 1930. We’d like to have this cut off at 50 if possible, so > 50 goes to 19** and < 50 goes to 20**
Also, is there a simple way to be able to use the backspace when entering dates. It seems that when using any of the date formats as a format property you have to reclick into the field in order to overwrite a mistake.
You should be able to create a table event or use the on datachange event for the first (when you talk about user input).
You would have to write it yourself.
The second problem might be solve when you add a pipe to the end of your mask. Left hand side of the mask is for display purposes and right hand side of the mask for user input.
All by heart so please try ( instead of just rely )
Thanks Marcel,
I was able to figure out a way to correct the year through an onDataChange method, and the formatting option you described does work for entry/display.
However, I suppose there is no way to be able to backspace when entering in a date field. I wonder if this is a reasonable feature request for Servoy, or if there is too much going on behind the scenes that would break.
Not with the calendar field.
When you want that you have to do all the coding in a text field ( with new disadvantages as a bonus ).
This is Java behaviour if I am not mistaken so you just have to accept it I guess…
Yep, We’re debating whether or not to use a text field or even a global field for all the entry and parsing it into a datetime field. But the reason why the datetime field is good is that the user CAN’T enter any old text string. Our parsing method would need to be robust enough to handle anything the user might throw at it and user friendly enough in it’s error reporting. I wish we could just backspace in a datetime field. My opinion right now is that the datetime field is probably the better option.