air-datepicker icon indicating copy to clipboard operation
air-datepicker copied to clipboard

Datepicker not populating value field

Open sabrinaazad opened this issue 7 years ago • 8 comments

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.

sabrinaazad avatar Feb 16 '18 21:02 sabrinaazad

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 avatar Feb 19 '18 09:02 t1m0n

@t1m0n have a similar problem https://jsfiddle.net/MyZik/3j2j7xe2/5/

MyZik avatar Feb 20 '18 20:02 MyZik

@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/

t1m0n avatar Feb 22 '18 14:02 t1m0n

I have the same issue. What's the resolution here?

petrosit avatar Feb 27 '18 23:02 petrosit

@petrosit what exactly issue do you have? Provide an example please.

t1m0n avatar Feb 28 '18 07:02 t1m0n

@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

petrosit avatar Feb 28 '18 10:02 petrosit

<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 });

При инициализации календаря, содержание поля удаляется

RenatAkhatayev avatar Mar 05 '19 04:03 RenatAkhatayev

@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.

michal-poplawski avatar Dec 30 '23 21:12 michal-poplawski