jQWidgets Forums
jQuery UI Widgets › Forums › Editors › DateTimeInput › jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost
This topic contains 5 replies, has 3 voices, and was last updated by SkippingAdi 9 years ago.
-
Author
-
February 19, 2016 at 3:46 pm jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost #81618
Hi Community
Based on this fiddle supplied by jqWidgets I have extende the JavaScript part with two more lines shown below:
$("#jqxDateTimeInput").jqxDateTimeInput({ width: '250px', height: '25px', theme: 'energyblue', formatString: "mm:ss", value: new Date('1899/12/30 00:01:36') });
It runs and shows only the minute and second part of the date as expected. But when you click in the Editor and then click or tab away the time is reset with 00:00. It would be great if we can use jqxDateTimeInput for entering times, as they are collected, for example, in Time Trials or Steeplechase races.
Is this a bug or is something wrong with the configuration?
Thank you for help.
Regards
AdrianFebruary 20, 2016 at 3:48 pm jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost #81633Hi Community
After some more testing we found that it must be a bug in current Version of jqwidgets. This because we have tried with different values and randomly found that the below configuration of jqxDateTimeInput only works for Dates equal or greater to 1900/01/01. All Dates below that one fail in our test.
Here the code to test:
$(“#jqxDateTimeInput”).jqxDateTimeInput({
width: ‘250px’,
height: ’25px’,
theme: ‘energyblue’,
formatString: “mm:ss”,
value: new Date(‘1899/12/30 00:01:36’)
});Change value to ‘1900/01/01 00:01:36’ and it works. Change the value to a date less than 1900/01/01 and it fails.
Implementation of the JavaScript date seems not compatible with ECMA Standards?
Regards
AdrianFebruary 21, 2016 at 1:56 pm jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost #81638The default min date for the DateTimeInput is 1900/01/01. Try setting the min date to a lower date.
$(‘#jqxDateTimeInput’).jqxDateTimeInput({ min: new Date(1800, 0, 1) });Pieter
February 24, 2016 at 2:17 pm jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost #81780Hi Pieter
I think you didn’t read carefully enough my incident. Because if I set the date to 1800/01/01 your DateTimeInput will still have the described bug.
Only if I Change the date to a value greater or equal than 1900/01/01 it works. But that doesn’t help a lot, because what if the data we or other users of this control receive from a Server backend is less than 1900/01/01? To check and adjust the date manually is the bad solution I think.Ok, the default date is 1900/01/01 for that control. A default is a default value and your control should also work if it receives date values less than the default value, right? Or is it a strict Limitation of this control that it cannot work at all with Dates less than 1900/01/01?
Could you fix that in one of the next Releases please?
AdrianFebruary 25, 2016 at 10:30 am jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost #81830Hi Adrian,
I think that you did not read Pieter’s post. You should set the “min” property of the widget which by default is 1900-01-01. If you wish, look at: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdatetimeinput/jquery-datetimeinput-api.htm to see that.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comMarch 1, 2016 at 9:29 am jqxDateTimeInput – when using formatString 'mm:ss' then on blur value ist lost #81959Hi Peter and Pieter
I apologize. My fault.
-
AuthorPosts
You must be logged in to reply to this topic.