The solution to the conflict between Vue.js and WdatePicker calendar control

Problem: When using Vue.js and WdatePicker at the same time, the two-way bound date field cannot obtain the value entered in the interface, and after the value of other fields is changed, the content of the date control will be cleared

Reason: WdatePicker is not a Vue plugin and cannot respond to Vue bindings. After modifying the value of other fields, because the value of the date field is empty, the content of the date control will also be cleared.

Solution: Bind the blur event of the date control, and assign a value to the date field in the event. Such as:

$_recordEditVM_checkDateBlur:function(){
if($.trim($('#checkDate').val()).length>0)
this.record.checkDate=$('#checkDate').val();
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324609154&siteId=291194637