Alessandro Posted September 4, 2017 Share Posted September 4, 2017 Good Morning. Do you know how to solve a problem with TUniDateTimePicker? Come on: The user does not want to select the date through the dropdown of the component. It wants to enter the date, without the bars (the component allows). However, when leaving the field, the date is converted to "mm / dd / yyyy" and I want to keep "dd / MM / yyyy" Can you help me? See the link below, which occurs: When typing 04092017 in the field, it should be 04/09/2017 but is converted to 04/09/2017 https://youtu.be/3NGID9dfWVM Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 4, 2017 Share Posted September 4, 2017 Hi Alessandro, Can help you: http://forums.unigui.com/index.php?/topic/8308-date-format-unidatetimepicker/&do=findComment&comment=42541 Best regards, 1 Quote Link to comment Share on other sites More sharing options...
Alessandro Posted September 4, 2017 Author Share Posted September 4, 2017 Hi Alessandro, Can help you: http://forums.unigui.com/index.php?/topic/8308-date-format-unidatetimepicker/&do=findComment&comment=42541 Best regards, Thank you very much Quote Link to comment Share on other sites More sharing options...
Alessandro Posted October 2, 2017 Author Share Posted October 2, 2017 For example for ExtLocale -> [pt_BR]UniDateTimePicker1 -> ClientEvents -> UniEvents -> beforeInit fn: function beforeInit(sender, config){config.altFormats="dmY|m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j";} FOR TIME: UniDateTimePicker1 -> ClientEvents -> UniEvents -> beforeInit fn: function beforeInit(sender, config){config.altFormats="g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A";} Hello! I have another question about the same problem. Now it is with the TIME field. When I type 1200, the script changes the text to 12:00 (okay!)! But, when I type 2000, the script does not change to 20:00. I noticed that the field gives a "2000 is not a valid value" error message. And the maximum the script manages to convert is up to 1259 which transforms to 12:59. I await. Thank you. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2017 Share Posted October 2, 2017 Hi Alessandro, Seems We should tell to timefield Hi :) Try this: function time.beforeInit(sender, config) { config.altFormats="Hi|g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A"; } Best regards, 1 Quote Link to comment Share on other sites More sharing options...
Alessandro Posted October 2, 2017 Author Share Posted October 2, 2017 Hi Alessandro, Seems We should tell to timefield Hi :) Try this: function time.beforeInit(sender, config) { config.altFormats="Hi|g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A"; } Best regards, THANKS!!! 1 Quote Link to comment Share on other sites More sharing options...
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.