![]() I can't believe this is a bug because datePicker is so widely used but I can't see any other conclusion. Actualy it keeps the selected date in the hidden field.But after the report generation, I guess the date picker Jquery runs again and sets the current date to the textbox. I would like to keep the selected date on the textboxes with the help of hidden fields. I think that separator: ' ' is causing the issue. I tried to do the same with other examples on the page, and all worked fine. My Django template/jQuery code is as follows, included in a script tag which is. I mean is this what happens with dateFormat: 'yy-mm-dd' (defaultDate's date was automatically set to the same date specified in setDate) what I think is, UI DatePicker shows defaultDate's date (which should be set to the same date specified in setDate). It gets 2 date parameters which are populated by JQuery datepicker. ('utilityexample1').datetimepicker('setDate', new Date(0)) you'll see that the date is set to today (the time is set properly): Actually, if you set it to a random date, the date is always set to today. When I try to use the change event of the input, it throws an error: Uncaught TypeError. Am I abusing datePicker Have scoured stackoverflow, experts exchange, etc. I am currently trying to make an inline datepicker object interact with a date input, and have managed everything but one thing. The problem is however, the datepickers doesn't update his value right away. ![]() I tried doing this by getting the value after the user has selected the date. 'As you can read in the documentation, selectDate is a function, so you must use it in this way' (see below) lectDate (new Date (2018, 3, 11)) But also note this, quoted from the documentation : 'Plugin instance is accessible through data attribute. So I want to check the date the user insert in the datepicker. Have tried this under Firefox and Chrome and get the same result. Found the answer based on this thread : set default date air-datepicker. ![]() I've got a problem with jQuery UI datepicker widget not accepting setDate or defaultDate parameters within the datepicker range.īasically, the widget is initialized within the loop ( I'm looping through HTML div rows - theRow variable is a holder ), and this is the code that's running: $. So setDate() doesn't work if the input field is inside a FORM element.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |