Background: Upload the form in the vue2 project, and report Error in v-on handler: "TypeError: dateObject.getTime is not a function"
![](https://img-blog.csdnimg.cn/img_convert/c3cd5e93a65f43f39e277eedf1bf0978.png)
Analysis: The reason is found to be caused by type:'date' in rules, because it is initialized to string type . The time here will become a string format after reselecting the time in the form.
![](https://img-blog.csdnimg.cn/img_convert/1b7baacad448b0af1395363942f9521a.png)
Solution: delete *type:'date' on date validation in rules ,
![](https://img-blog.csdnimg.cn/img_convert/ae1f8600f78f19e399b3f849ba0ee046.png)