0

I've read all the SO topics on this, and tried numerous things. Even the jQuery Datepicker information page at http://jqueryui.com/datepicker/#default shows the behavior I don't understand.

a. Click in the input field > datepicker pops up b. Select a date > visually, input field appears to show your selected date c. However, the "value" attribute for the input field does not change to the selected date

What am I missing, please? Thanks

  • 2
    Where is your code? How do you know the value is no the date? – haxtbh Dec 13 '14 at 16:45
  • Are you inspective `DOM` and expecting the value **attribute** to change..? :/ – T J Dec 13 '14 at 17:01
  • @haxtbh I was just using the Datepicker demo page to show code since it exhibits the same behavior. – Paul Kaiser Dec 13 '14 at 18:26
  • @TJ Yes, that's what I was checking – Paul Kaiser Dec 13 '14 at 18:26
  • @PaulKaiser you can't see a change in **attribute**, which is displayed while inspecting the `DOM`. Internally the **property** value will change, which you can check by accessing the value via js... [those are different things...](http://stackoverflow.com/q/6003819/2333214) – T J Dec 13 '14 at 18:55

1 Answers1

0

Firebug always show the default value of any html element. It never changes value when reflects on Client side. However when u will submit or serialize the form, the updated value will pass to the $_POST.

TECHNOMAN
  • 361
  • 1
  • 9
  • the method of form in which all values of elements inside form goes after submit – TECHNOMAN Dec 13 '14 at 18:33
  • @TJ Ugh, sorry, $_POST shows the value has actually been updated, just not shown in the DOM as TECHNOMAN pointed out. So, not a jQuery problem, but problem between chair and keyboard... :( – Paul Kaiser Dec 13 '14 at 18:34