Solution to input on model conflict between datepicker and Vue


In the work, we need to do a function of dynamically configuring the delivery time. The front end is the Vue. The code format is as follows:

3 delivery time:
5 delivery time alias:
6 delete

Results during debugging, Vue conflicts with datepicker when setting input value. Both the internal mechanisms of V-model and wdatepicker listen to the value attribute, resulting in the value Vue selected by the date control not being recognized. Then, search online for solutions, which can be handled through the ONPICKING compromise of the user-defined event of datepicker. The codes are as follows:


Because the dynamic delivery time here is to assign a value to an item in the array, when the text box is clicked, record the line in which the operation is performed, and then set the date for this item.

Note: the old version of datepicker may not have a getnewdatestr function, so just reference the new version of datepicker.

So far, the problem has been solved, which is hereby recorded.

Recommended Today

CCleaner 5.8 Green Chinese version ccleaner is a simple and easy-to-use file cleaning tool.

CCleaner 5.8 Green Chinese Edition basic introduction ccleanerIt is a simple and easy-to-use file cleaning tool. ccleaner can remove all junk files in the system, free up hard disk space and protect system privacy. ccleaner is small in size, fast in operation, and can scan the registry at the same time. Friends who need […]