Merge pull request #1712 from SergioCrisostomo/add-more-datepicker-tests
Refactor cell click handler and add more date picker and date range picker tests
This commit is contained in:
commit
68e3642119
3 changed files with 153 additions and 78 deletions
|
@ -57,6 +57,16 @@ exports.createTest = function(Compo, propsData = {}, mounted = false) {
|
|||
return new Ctor({ propsData }).$mount(mounted === false ? null : elm);
|
||||
};
|
||||
|
||||
/**
|
||||
* Transform Date string (yyyy-mm-dd hh:mm:ss) to Date object
|
||||
* @param {String}
|
||||
*/
|
||||
exports.stringToDate = function(str) {
|
||||
const parts = str.split(/[^\d]/).filter(Boolean);
|
||||
parts[1] = parts[1] - 1;
|
||||
return new Date(...parts);
|
||||
};
|
||||
|
||||
/**
|
||||
* 触发一个事件
|
||||
* mouseenter, mouseleave, mouseover, keyup, change, click 等
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue