Quantcast
Channel: Krajee Yii2 Extensions – Krajee Web Tips
Viewing all articles
Browse latest Browse all 129

Set date in yii2-datecontrol input field Using Jquery

$
0
0

I have tried to get date that returns from ajax code , in my datecontrol  input field.  I can see the date in the field ,but when pressed submit button that value is not getting in post. 
 So I add two line code for display the value and assign the value
 
For getting value in post i used this one
$(‘#vehicle-dfr’).val(‘2006-06-30’);
For Display
$(“#vehicle-dfr-disp-kvdate”).kvDatepicker(“update”, new Date(‘2006-06-30’));
This works for me.But I would like to know whether it is the good  solution or  there have any alternate method for write this code in single line.
 

The post Set date in yii2-datecontrol input field Using Jquery appeared first on Krajee Web Tips.


Viewing all articles
Browse latest Browse all 129

Trending Articles