air-datepicker
air-datepicker copied to clipboard
Datepicker not populating value field
Hey, my datepicker works fine. But I notice this is not filling the value field once a date is selected/updated. The value field is null. How can I change this? I see in my console the value field is not updating.
Hi! Could you please provide an example of your problem on https://jsfiddle.net/ ? As I understand that after selecting date in calendar, input's value doesn't change?
@t1m0n have a similar problem https://jsfiddle.net/MyZik/3j2j7xe2/5/
@MyZik you are using wrong id
attribute in your example. Should use id='datepicker'
instead of id='#datepicker1'
. Here's what it could look like https://jsfiddle.net/3j2j7xe2/48/
I have the same issue. What's the resolution here?
@petrosit what exactly issue do you have? Provide an example please.
@t1m0n I set the value field to my predefined date and upon load, it is being removed from the text field and it's empty. I've now found a workaround by using the placeholder field...
so e.g. -> the value is being removed on page load
<input id="u_birthday" class="form-control datepicker-here" autocomplete="off" name="u_birthday" value="01/01/2000">
$('#u_birthday').datepicker({ language: config.language, firstDay: 1, dateFormat: "dd/mm/yyyy", autoClose: true });
При инициализации календаря, содержание поля удаляется
@t1m0n Hello, I'm struggling to submit value from air-datepicker. Everything works fine, like selecting dates and showing correct one in input field, but it doesn't fill value of input, which leads to the value not being sent through the form.
Can you please show basic form example how to submit date from air-datepicker? Seems like we need to do some 'hacks' for that.