jQWidgets Forums
jQuery UI Widgets › Forums › Editors › DateTimeInput › jqxDateTimeInput formatString does not seem to work
Tagged: datetimeinput, jquery date input
This topic contains 6 replies, has 2 voices, and was last updated by nico 9 years, 8 months ago.
-
Author
-
Hello,
formatString settings does not seem to work properly.
It is followed only if value is setup by default or by binding.
If you have to choose value manually, it is not followed.This is my code:
http://jsfiddle.net/NicoD/3o8L4nrw/Is there a code that may correct this issue?
Thank youN
Hi nico,
The issue here is not on our side. this.dataTo = ko.observable(); is not JavaScript Date Object and it is not Date String, too. jqxDateTimeInput expects JavaScript Date objects or Date Strings. This is what we demonstrate in our samples and documentation and if you want to use that widget, it should be in the way we demonstrate it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi peter
If user has not set already a date,
the widget needs that a default date is displayed?
Your widget cannot show a null value if it is not already selected?
ThanksN
So there is not a solution?
Hi nico,
The widget shows the current date if no value is selected. It can also show NULL date/value if null is set as value during the initialization. The problem in your code is that you try to set its value from inappropriate not supported object. The value should be what I explained in previous post. Here http://jsfiddle.net/htezvmz4/ it shows NULL date. If value is not set – http://jsfiddle.net/4e4bzhdc/, it shows the current date. That is how it works.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Maybe you didn’t look my code, but in my case I’m using binding from Knockout.
Your example is static and it is really different from my code.
You said that ko.observable() cannot be translated into a date, but NULL value
can be showed as well.
I tried ko.observable(null), and nothing changed.
Is there a not static solution?
Thank YouN
No solution?
-
AuthorPosts
You must be logged in to reply to this topic.