In the jquery easyi date control, use JS to get the set date value in the page
jquery gets the value of the easyi date control
jquery easyi date box
There is a date text box like this:
<input type="text" name="mdate" size="20" value="" class="easyui-datebox"/>
Use easyi to select the date value for the text box, and then, you want to get the latest value in this date box in JS.
I thought this was a simple question,
var dv = $('#mdate').val();
Isn't it OK? But things went against my wishes. What I got was empty. If I assign the initial value to this text box in the background, no matter what value you choose, the initial value will still be the same.
Solution, use easyi's own function to get it, and you can get it:
var dv = $('#mdate').datebox('getValue');
The reason is that easyi also added a hidden input form, which assigns the value to that, but it is still strange that when submitting the form, the form named mdate submitted the correct value in the past. I suspected that it was done before submitting, and dynamically assigned a value to the original form. No careful study.
The above article jquery obtains the value implementation method of easyi date control is all the content I have shared with you. I hope you can give you a reference and I hope you can support me more.