vue2-datepicker
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -1,3 +0,3 @@ | ||
<a name="3.0.2"></a> | ||
## [3.0.2](https://github.com/mengxiong10/vue2-datepicker/compare/v3.0.1...v3.0.2) (2019-11-14) | ||
<a name="3.1.0"></a> | ||
# [3.1.0](https://github.com/mengxiong10/vue2-datepicker/compare/v3.0.2...v3.1.0) (2019-11-21) | ||
@@ -7,5 +7,4 @@ | ||
* compatible with vue old version inject ([c03632f](https://github.com/mengxiong10/vue2-datepicker/commit/c03632f)) | ||
* should return `[null, null]` when clear range ([635631f](https://github.com/mengxiong10/vue2-datepicker/commit/635631f)) | ||
* when year < 100 && year >= 0 should be right ([8c546cc](https://github.com/mengxiong10/vue2-datepicker/commit/8c546cc)) | ||
* ie style compatible ([e69b9b7](https://github.com/mengxiong10/vue2-datepicker/commit/e69b9b7)) | ||
* move sidebar element to right position ([32c74a4](https://github.com/mengxiong10/vue2-datepicker/commit/32c74a4)) | ||
@@ -15,6 +14,21 @@ | ||
* add prop `partial-update` ([07f4271](https://github.com/mengxiong10/vue2-datepicker/commit/07f4271)) | ||
* add slot `input` ([ffd3918](https://github.com/mengxiong10/vue2-datepicker/commit/ffd3918)) | ||
* export the scss for custom style ([09a4d8f](https://github.com/mengxiong10/vue2-datepicker/commit/09a4d8f)) | ||
<a name="3.0.2"></a> | ||
## [3.0.2](https://github.com/mengxiong10/vue2-datepicker/compare/v3.0.1...v3.0.2) (2019-11-14) | ||
### Bug Fixes | ||
- compatible with vue old version inject ([c03632f](https://github.com/mengxiong10/vue2-datepicker/commit/c03632f)) | ||
- should return `[null, null]` when clear a range ([635631f](https://github.com/mengxiong10/vue2-datepicker/commit/635631f)) | ||
- when year < 100 && year >= 0, the date should be right ([8c546cc](https://github.com/mengxiong10/vue2-datepicker/commit/8c546cc)) | ||
### Features | ||
- add prop `partial-update`. It'll update the date when select year or month in `type='date'` or `type='datetime'` ([07f4271](https://github.com/mengxiong10/vue2-datepicker/commit/07f4271)) | ||
<a name="3.0.1"></a> | ||
@@ -26,5 +40,4 @@ | ||
- clear event not triggering ([#369](https://github.com/mengxiong10/vue2-datepicker/issues/369)) ([06e158e](https://github.com/mengxiong10/vue2-datepicker/commit/06e158e)) | ||
- fix clear event not triggering ([#369](https://github.com/mengxiong10/vue2-datepicker/issues/369)) ([06e158e](https://github.com/mengxiong10/vue2-datepicker/commit/06e158e)) | ||
- ie compatibility ([99a4abd](https://github.com/mengxiong10/vue2-datepicker/commit/99a4abd)) | ||
- update date-format-parse to fix negative year ([5ca30f8](https://github.com/mengxiong10/vue2-datepicker/commit/5ca30f8)) | ||
@@ -52,3 +65,3 @@ <a name="3.0.0"></a> | ||
- Add prop `open` to control the state of popup | ||
- Add ability to select ampm, base on formatted token | ||
- Add select am/pm, when use12hours | ||
- Add event `open` and `close` | ||
@@ -89,5 +102,14 @@ - Add `hourStep`/`minuteStep`/`secondStep`/`showHour`/`showMinute`/`showSecond`/`use12h` to time picker for more configuration | ||
- Remove `width`, use `style="{ width: '' }"` instead. | ||
- Remove `width`, use `style="{ width: "" }"` instead. | ||
- modify `shortcuts` api. | ||
```js | ||
[ | ||
{ text: 'today', onClick: () => new Date() // return a Date } | ||
]; | ||
``` | ||
- Remove prop `firstDayOfWeek` to locale. | ||
## [2.13.3](https://github.com/mengxiong10/vue2-datepicker/compare/v2.13.2...v2.13.3) (2019-10-29) | ||
@@ -110,3 +132,3 @@ | ||
- the Spanish Language error ([#361](https://github.com/mengxiong10/vue2-datepicker/issues/361)) ([04e1032](https://github.com/mengxiong10/vue2-datepicker/commit/04e10328eabfac6e10fe4a49e7579f2eff7a1736)) | ||
- fix the Spanish Language error ([#361](https://github.com/mengxiong10/vue2-datepicker/issues/361)) ([04e1032](https://github.com/mengxiong10/vue2-datepicker/commit/04e10328eabfac6e10fe4a49e7579f2eff7a1736)) | ||
@@ -117,3 +139,3 @@ # [2.13.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.12.0...v2.13.0) (2019-10-14) | ||
- removed stoppropagation ([864ab83](https://github.com/mengxiong10/vue2-datepicker/commit/864ab835ca93322eb103fa1e00770976b7d95c41)) | ||
- removed keyboard event `stopPropagation` ([864ab83](https://github.com/mengxiong10/vue2-datepicker/commit/864ab835ca93322eb103fa1e00770976b7d95c41)) | ||
- the clickoutside don't work sometimes ([#326](https://github.com/mengxiong10/vue2-datepicker/issues/326)) ([d9619f8](https://github.com/mengxiong10/vue2-datepicker/commit/d9619f815c6a87052b353b800c7e597a8dea816a)) | ||
@@ -143,3 +165,3 @@ | ||
- close popup after select range ([5823f85](https://github.com/mengxiong10/vue2-datepicker/commit/5823f85)) | ||
- close popup after select shortcuts ([5823f85](https://github.com/mengxiong10/vue2-datepicker/commit/5823f85)) | ||
@@ -146,0 +168,0 @@ # [2.11.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.10.3...v2.11.0) (2019-04-09) |
@@ -1,126 +0,253 @@ | ||
# [2.10.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.9.2...v2.10.0) (2019-02-12) | ||
<a name="3.0.2"></a> | ||
## [3.0.2](https://github.com/mengxiong10/vue2-datepicker/compare/v3.0.1...v3.0.2) (2019-11-14) | ||
### 修复 Bug | ||
- 兼容旧版 vue 的`inject`语法 ([c03632f](https://github.com/mengxiong10/vue2-datepicker/commit/c03632f)) | ||
- 应该返回 `[null, null]` 当清除范围的时候 ([635631f](https://github.com/mengxiong10/vue2-datepicker/commit/635631f)) | ||
- 当年在 0 到 100 时候显示问题 ([8c546cc](https://github.com/mengxiong10/vue2-datepicker/commit/8c546cc)) | ||
### 新功能 | ||
* 添加属性default-value作为打开日历的默认时间 ([#94](https://github.com/mengxiong10/vue2-datepicker/issues/94)) ([4ff6945](https://github.com/mengxiong10/vue2-datepicker/commit/4ff6945)) | ||
* 输入框有焦点的时候自动打开日历选择, 失去焦点时关闭 ([3bcedf5](https://github.com/mengxiong10/vue2-datepicker/commit/3bcedf5)) | ||
- 添加属性 `partial-update`, 选择年或月的时候也更新日期 ([07f4271](https://github.com/mengxiong10/vue2-datepicker/commit/07f4271)) | ||
<a name="3.0.1"></a> | ||
## [3.0.1](https://github.com/mengxiong10/vue2-datepicker/compare/v3.0.0...v3.0.1) (2019-11-11) | ||
## [2.9.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.9.1...v2.9.2) (2019-02-10) | ||
### 修复 Bug | ||
- 修复清除事件没有触发 ([#369](https://github.com/mengxiong10/vue2-datepicker/issues/369)) ([06e158e](https://github.com/mengxiong10/vue2-datepicker/commit/06e158e)) | ||
- ie 兼容性 ([99a4abd](https://github.com/mengxiong10/vue2-datepicker/commit/99a4abd)) | ||
### 修复Bug | ||
<a name="3.0.0"></a> | ||
* 选择年的面板的标题显示错误 ([#245](https://github.com/mengxiong10/vue2-datepicker/issues/245)) ([7bc2785](https://github.com/mengxiong10/vue2-datepicker/commit/7bc2785)) | ||
# [3.0.0](https://github.com/mengxiong10/vue2-datepicker/compare/v3.0.0-beta.1...v3.0.0) (2019-11-10) | ||
### 修复 bug | ||
- 修复国际化没有应用到日期的格式 | ||
## [2.9.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.9.0...v2.9.1) (2019-02-01) | ||
### 新功能 | ||
- 添加星期选择 | ||
```html | ||
<date-picer type="week" /> | ||
``` | ||
- 添加内联模式, 没有输入框 | ||
### 修复Bug | ||
```html | ||
<date-picker inline /> | ||
``` | ||
* 修复当绑定的值是null时格式化字符串返回的时间错误 ([#244](https://github.com/mengxiong10/vue2-datepicker/issues/244)) ([92243ab](https://github.com/mengxiong10/vue2-datepicker/commit/92243ab)) | ||
- 添加 `open` 控制弹窗的状态 | ||
- 添加 am/pm 的选择, 当使用 12 小时制 | ||
- 添加事件`open`和`close` | ||
- 添加 `hourStep`/`minuteStep`/`secondStep`/`showHour`/`showMinute`/`showSecond`/`use12h` 对时间选择更多的控制 | ||
### 不兼容更新 | ||
- 需要单独引入样式 | ||
- 修改默认语音是英文, 可以自行引入语言包 | ||
- 日期范围选择重构, 现在模式是可以在一个日历上面选择范围, 每次选择需要点击 2 次. | ||
- 修改 slot `calendar-icon` 为 `icon-calendar`. | ||
- `appendToBody` 默认值修改为 true. | ||
- 移除 `not-before` 和 `not-after`, 用 `disabledDate` 代替. | ||
# [2.9.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.8.1...v2.9.0) (2019-01-29) | ||
```html | ||
<template> | ||
<date-picker :disabled-date="notBeforeToday"></date-picker> | ||
<date-picker :disabled-date="notAfterToday"></date-picker> | ||
</template> | ||
<script> | ||
export default { | ||
methods: { | ||
notBeforeToday(date) { | ||
const today = new Date(); | ||
today.setHours(0, 0, 0, 0); | ||
return date.getTime() < today.getTime(); | ||
}, | ||
notAfterToday(date) { | ||
const today = new Date(); | ||
today.setHours(0, 0, 0, 0); | ||
return date.getTime() > today.getTime(); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
``` | ||
- 移除`width`, 用 `style="{ width: "" }"` 代替. | ||
- 修改 `shortcuts` , onClick 函数返回一个日期. | ||
- 移除`firstDayOfWeek`到语言包 | ||
## [2.13.3](https://github.com/mengxiong10/vue2-datepicker/compare/v2.13.2...v2.13.3) (2019-10-29) | ||
### 修复 Bug | ||
- 修复`defaultValue`的变化应该修改日历显示 ([#364](https://github.com/mengxiong10/vue2-datepicker/issues/364)) ([5e463bd](https://github.com/mengxiong10/vue2-datepicker/commit/5e463bd3cf973b5257a58810f980c46e26824426)) | ||
## [2.13.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.13.1...v2.13.2) (2019-10-23) | ||
### 修复 Bug | ||
- 兼容移动端点击事件 ([#334](https://github.com/mengxiong10/vue2-datepicker/issues/334)) ([57d57fc](https://github.com/mengxiong10/vue2-datepicker/commit/57d57fc645d670e88c60141d2238066c2ed1ce8f)) | ||
- 修复`ro`语言 ([43c59e6](https://github.com/mengxiong10/vue2-datepicker/commit/43c59e6b40ac71dd9ea988d0b51269e99dff7b22)) | ||
## [2.13.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.13.0...v2.13.1) (2019-10-22) | ||
### 修复 Bug | ||
- 修复西班牙语错误 ([#361](https://github.com/mengxiong10/vue2-datepicker/issues/361)) ([04e1032](https://github.com/mengxiong10/vue2-datepicker/commit/04e10328eabfac6e10fe4a49e7579f2eff7a1736)) | ||
# [2.13.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.12.0...v2.13.0) (2019-10-14) | ||
### 修复 Bug | ||
- 移除键盘事件的阻止冒泡 ([864ab83](https://github.com/mengxiong10/vue2-datepicker/commit/864ab835ca93322eb103fa1e00770976b7d95c41)) | ||
- 修复 clickoutside 有时无效的问题 ([#326](https://github.com/mengxiong10/vue2-datepicker/issues/326)) ([d9619f8](https://github.com/mengxiong10/vue2-datepicker/commit/d9619f815c6a87052b353b800c7e597a8dea816a)) | ||
### 新功能 | ||
* 支持自定义格式化函数 ([c801516](https://github.com/mengxiong10/vue2-datepicker/commit/c801516)) | ||
- 添加属性 `icon-day` 去选择日历图标的文字 ([62c3d60](https://github.com/mengxiong10/vue2-datepicker/commit/62c3d60dd93c15a3c3c8d433836f3bb364d30bb7)) | ||
# [2.12.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.11.2...v2.12.0) (2019-06-25) | ||
### 新功能 | ||
## [2.8.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.8.0...v2.8.1) (2019-01-24) | ||
- 添加属性 `time-select-options` ([#227](https://github.com/mengxiong10/vue2-datepicker/issues/227)) ([a55b4b6](https://github.com/mengxiong10/vue2-datepicker/commit/a55b4b6)) | ||
## [2.11.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.11.1...v2.11.2) (2019-05-15) | ||
### 修复Bug | ||
### 修复 Bug | ||
* 点击外部关闭监听的函数从捕获改成冒泡, 可以用stopPropagation 阻止关闭 ([054758e](https://github.com/mengxiong10/vue2-datepicker/commit/054758e)) | ||
- 移除最后一个快捷选项的 "|" ([c6a6300](https://github.com/mengxiong10/vue2-datepicker/commit/c6a6300)) | ||
- 修复测试由于时区失败的问题 ([#300](https://github.com/mengxiong10/vue2-datepicker/issues/300)) ([ec69590](https://github.com/mengxiong10/vue2-datepicker/commit/ec69590)) | ||
## [2.11.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.11.0...v2.11.1) (2019-04-30) | ||
# [2.8.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.7.0...v2.8.0) (2019-01-13) | ||
### 修复 Bug | ||
- 关闭弹窗当选择快捷方式的时候 ([5823f85](https://github.com/mengxiong10/vue2-datepicker/commit/5823f85)) | ||
# [2.11.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.10.3...v2.11.0) (2019-04-09) | ||
### 修复 Bug | ||
- 修复 `clickoutside` 失效 ([#291](https://github.com/mengxiong10/vue2-datepicker/issues/291)) ([9bb6046](https://github.com/mengxiong10/vue2-datepicker/commit/9bb6046)) | ||
### 新功能 | ||
* 添加属性 `valueType` 格式化绑定值 ([dd6f2ea](https://github.com/mengxiong10/vue2-datepicker/commit/dd6f2ea)) | ||
- 添加事件 `select-year` 和 `select-month` ([#290](https://github.com/mengxiong10/vue2-datepicker/issues/290)) ([20d1f19](https://github.com/mengxiong10/vue2-datepicker/commit/20d1f19)) | ||
| 可选值 | 描述 | ||
|-----------------|--------------------------------------- | ||
| date | 返回的绑定值是Date对象 | ||
| timestamp | 返回的绑定值是时间戳数字 | ||
| format | 返回的绑定值是通过`format`属性格式化的值 | ||
## [2.10.3](https://github.com/mengxiong10/vue2-datepicker/compare/v2.10.2...v2.10.3) (2019-03-14) | ||
### 修复 Bug | ||
# [2.7.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.3...v2.7.0) (2019-01-08) | ||
- 修复手动输入不会改变值 ([#266](https://github.com/mengxiong10/vue2-datepicker/issues/266)) ([aa20a1e](https://github.com/mengxiong10/vue2-datepicker/commit/aa20a1e)) | ||
## [2.10.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.10.1...v2.10.2) (2019-03-14) | ||
### 修复 Bug | ||
- 修复选择分钟会影响小时的问题 ([#168](https://github.com/mengxiong10/vue2-datepicker/issues/168)) ([2afed88](https://github.com/mengxiong10/vue2-datepicker/commit/2afed88)) | ||
- 移除输入框后缀的样式 ([e7775d6](https://github.com/mengxiong10/vue2-datepicker/commit/e7775d6)) | ||
### Performance Improvements | ||
- 移除 IE10 的默认清除样式([6a990d8](https://github.com/mengxiong10/vue2-datepicker/commit/6a990d8)) | ||
# [2.10.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.9.2...v2.10.0) (2019-02-12) | ||
### 新功能 | ||
* 在mx-calendar元素上添加class去表明现在的窗口类型(mx-clendar-panel-(year, date, time, month)) ([#219](https://github.com/mengxiong10/vue2-datepicker/issues/219)) ([1d0a67b](https://github.com/mengxiong10/vue2-datepicker/commit/1d0a67b)) | ||
* 添加新的属性inputAttr 去自定义input 的属性 ([2381089](https://github.com/mengxiong10/vue2-datepicker/commit/2381089)) | ||
- 添加属性 default-value 作为打开日历的默认时间 ([#94](https://github.com/mengxiong10/vue2-datepicker/issues/94)) ([4ff6945](https://github.com/mengxiong10/vue2-datepicker/commit/4ff6945)) | ||
- 输入框有焦点的时候自动打开日历选择, 失去焦点时关闭 ([3bcedf5](https://github.com/mengxiong10/vue2-datepicker/commit/3bcedf5)) | ||
## [2.9.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.9.1...v2.9.2) (2019-02-10) | ||
### 修复 Bug | ||
## [2.6.4](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.3...v2.6.4) (2018-12-19) | ||
- 选择年的面板的标题显示错误 ([#245](https://github.com/mengxiong10/vue2-datepicker/issues/245)) ([7bc2785](https://github.com/mengxiong10/vue2-datepicker/commit/7bc2785)) | ||
## [2.9.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.9.0...v2.9.1) (2019-02-01) | ||
### 修复Bug | ||
### 修复 Bug | ||
* 修复当手动清空输入框时间没有改变 ([39d2c40](https://github.com/mengxiong10/vue2-datepicker/commit/39d2c40)) | ||
- 修复当绑定的值是 null 时格式化字符串返回的时间错误 ([#244](https://github.com/mengxiong10/vue2-datepicker/issues/244)) ([92243ab](https://github.com/mengxiong10/vue2-datepicker/commit/92243ab)) | ||
## [2.6.3](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.2...v2.6.3) (2018-12-08) | ||
# [2.9.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.8.1...v2.9.0) (2019-01-29) | ||
### 新功能 | ||
### 修复Bug | ||
- 支持自定义格式化函数 ([c801516](https://github.com/mengxiong10/vue2-datepicker/commit/c801516)) | ||
* 修复手动输入范围时无法成功的问题 ([#209](https://github.com/mengxiong10/vue2-datepicker/issues/209)) ([97289d1](https://github.com/mengxiong10/vue2-datepicker/commit/97289d1)) | ||
## [2.8.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.8.0...v2.8.1) (2019-01-24) | ||
### 修复 Bug | ||
- 点击外部关闭监听的函数从捕获改成冒泡, 可以用 stopPropagation 阻止关闭 ([054758e](https://github.com/mengxiong10/vue2-datepicker/commit/054758e)) | ||
## [2.6.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.1...v2.6.2) (2018-10-30) | ||
# [2.8.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.7.0...v2.8.0) (2019-01-13) | ||
### 新功能 | ||
### 修复Bug | ||
- 添加属性 `valueType` 格式化绑定值 ([dd6f2ea](https://github.com/mengxiong10/vue2-datepicker/commit/dd6f2ea)) | ||
* `calendar-change`事件在正确的时候触发 ([b1a5a41](https://github.com/mengxiong10/vue2-datepicker/commit/b1a5a41)) | ||
| 可选值 | 描述 | | ||
| --------- | ---------------------------------------- | | ||
| date | 返回的绑定值是 Date 对象 | | ||
| timestamp | 返回的绑定值是时间戳数字 | | ||
| format | 返回的绑定值是通过`format`属性格式化的值 | | ||
# [2.7.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.3...v2.7.0) (2019-01-08) | ||
### 新功能 | ||
* 添加 `calendar-change` 事件 ([ef9314e](https://github.com/mengxiong10/vue2-datepicker/commit/ef9314e)) | ||
- 在 mx-calendar 元素上添加 class 去表明现在的窗口类型(mx-clendar-panel-(year, date, time, month)) ([#219](https://github.com/mengxiong10/vue2-datepicker/issues/219)) ([1d0a67b](https://github.com/mengxiong10/vue2-datepicker/commit/1d0a67b)) | ||
- 添加新的属性 inputAttr 去自定义 input 的属性 ([2381089](https://github.com/mengxiong10/vue2-datepicker/commit/2381089)) | ||
## [2.6.4](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.3...v2.6.4) (2018-12-19) | ||
### 修复 Bug | ||
## [2.6.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.0...v2.6.1) (2018-10-17) | ||
- 修复当手动清空输入框时间没有改变 ([39d2c40](https://github.com/mengxiong10/vue2-datepicker/commit/39d2c40)) | ||
## [2.6.3](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.2...v2.6.3) (2018-12-08) | ||
### 修复Bug | ||
### 修复 Bug | ||
* 阻止组件的事件冒泡到外面 ([de177d8](https://github.com/mengxiong10/vue2-datepicker/commit/de177d8)) | ||
- 修复手动输入范围时无法成功的问题 ([#209](https://github.com/mengxiong10/vue2-datepicker/issues/209)) ([97289d1](https://github.com/mengxiong10/vue2-datepicker/commit/97289d1)) | ||
## [2.6.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.1...v2.6.2) (2018-10-30) | ||
### 修复 Bug | ||
- `calendar-change`事件在正确的时候触发 ([b1a5a41](https://github.com/mengxiong10/vue2-datepicker/commit/b1a5a41)) | ||
### 新功能 | ||
* script直接引用的时候自动注册组件 ([a310f59](https://github.com/mengxiong10/vue2-datepicker/commit/a310f59)) | ||
- 添加 `calendar-change` 事件 ([ef9314e](https://github.com/mengxiong10/vue2-datepicker/commit/ef9314e)) | ||
## [2.6.1](https://github.com/mengxiong10/vue2-datepicker/compare/v2.6.0...v2.6.1) (2018-10-17) | ||
### 修复 Bug | ||
# [2.6.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.5.0...v2.6.0) (2018-10-11) | ||
- 阻止组件的事件冒泡到外面 ([de177d8](https://github.com/mengxiong10/vue2-datepicker/commit/de177d8)) | ||
### 新功能 | ||
### 修复Bug | ||
- script 直接引用的时候自动注册组件 ([a310f59](https://github.com/mengxiong10/vue2-datepicker/commit/a310f59)) | ||
* 修复快捷方式的颜色 ([ac4aa87](https://github.com/mengxiong10/vue2-datepicker/commit/ac4aa87)) | ||
# [2.6.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.5.0...v2.6.0) (2018-10-11) | ||
### 修复 Bug | ||
- 修复快捷方式的颜色 ([ac4aa87](https://github.com/mengxiong10/vue2-datepicker/commit/ac4aa87)) | ||
### 新功能 | ||
* 添加属性 `appendToBody` ([e26e1f5](https://github.com/mengxiong10/vue2-datepicker/commit/e26e1f5)) | ||
- 添加属性 `appendToBody` ([e26e1f5](https://github.com/mengxiong10/vue2-datepicker/commit/e26e1f5)) | ||
# [2.5.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.4.3...v2.5.0) (2018-10-05) | ||
@@ -130,26 +257,24 @@ | ||
* 添加 `panel-change` 事件 ([5cdba7b](https://github.com/mengxiong10/vue2-datepicker/commit/5cdba7b)) | ||
- 添加 `panel-change` 事件 ([5cdba7b](https://github.com/mengxiong10/vue2-datepicker/commit/5cdba7b)) | ||
## [2.4.3](https://github.com/mengxiong10/vue2-datepicker/compare/v2.4.0...v2.4.3) (2018-09-28) | ||
### 修复Bug | ||
### 修复 Bug | ||
* 修复选择时间时候显示'am', 'pm' ([8e475b3](https://github.com/mengxiong10/vue2-datepicker/commit/8e475b3)) | ||
* 修复一个IE兼容性问题 ([fefed17](https://github.com/mengxiong10/vue2-datepicker/commit/fefed17)) | ||
* 当选择一个时间的时候关闭面板 ([#154](https://github.com/mengxiong10/vue2-datepicker/issues/154)) ([12907ad](https://github.com/mengxiong10/vue2-datepicker/commit/12907ad)) | ||
* 修复年和月的禁用函数错误 ([#169](https://github.com/mengxiong10/vue2-datepicker/issues/169)) ([42bc068](https://github.com/mengxiong10/vue2-datepicker/commit/42bc068)) | ||
- 修复选择时间时候显示'am', 'pm' ([8e475b3](https://github.com/mengxiong10/vue2-datepicker/commit/8e475b3)) | ||
- 修复一个 IE 兼容性问题 ([fefed17](https://github.com/mengxiong10/vue2-datepicker/commit/fefed17)) | ||
- 当选择一个时间的时候关闭面板 ([#154](https://github.com/mengxiong10/vue2-datepicker/issues/154)) ([12907ad](https://github.com/mengxiong10/vue2-datepicker/commit/12907ad)) | ||
- 修复年和月的禁用函数错误 ([#169](https://github.com/mengxiong10/vue2-datepicker/issues/169)) ([42bc068](https://github.com/mengxiong10/vue2-datepicker/commit/42bc068)) | ||
### 新功能 | ||
* 添加一个`clear`事件 ([e0776b6](https://github.com/mengxiong10/vue2-datepicker/commit/e0776b6)) | ||
- 添加一个`clear`事件 ([e0776b6](https://github.com/mengxiong10/vue2-datepicker/commit/e0776b6)) | ||
<a name="2.4.0"></a> | ||
<a name="2.4.0"></a> | ||
# [2.4.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.3.2...v2.4.0) (2018-08-08) | ||
### 新功能 | ||
* 添加属性`type`为`time`的时候只显示时间组件 | ||
- 添加属性`type`为`time`的时候只显示时间组件 | ||
@@ -160,23 +285,20 @@ ## [2.3.2](https://github.com/mengxiong10/vue2-datepicker/compare/v2.2.0...v2.3.2) (2018-08-07) | ||
* 添加属性 `date-format` 格式化时间组件头部和日期的tooltip | ||
- 添加属性 `date-format` 格式化时间组件头部和日期的 tooltip | ||
# [2.2.0](https://github.com/mengxiong10/vue2-datepicker/compare/v2.1.0...v2.2.0) (2018-08-06) | ||
### 修复bug | ||
### 修复 bug | ||
* 设置input的autocomplete为off避免下拉框的干扰 | ||
- 设置 input 的 autocomplete 为 off 避免下拉框的干扰 | ||
### 新功能 | ||
* 添加时间'change-calendar-yeaer', 'change-calendar-month'方便联动两个窗口 | ||
- 添加时间'change-calendar-yeaer', 'change-calendar-month'方便联动两个窗口 | ||
# [2.1.0]() (2018-07-24) | ||
### 新功能 | ||
* 添加`type` 支持月和年的单独选择 | ||
- 添加`type` 支持月和年的单独选择 | ||
# [2.0.0]() (2018-06-16) | ||
@@ -186,13 +308,13 @@ | ||
* 添加`clearable` 用于控制是否显示清除按钮 | ||
* 添加 slot `calendar-icon` 自定义日历图标 | ||
* 添加 slot `header` 和 `footer` 自定义弹出日历的头部和尾部 | ||
* `disabledDays` 现在支持函数 | ||
- 添加`clearable` 用于控制是否显示清除按钮 | ||
- 添加 slot `calendar-icon` 自定义日历图标 | ||
- 添加 slot `header` 和 `footer` 自定义弹出日历的头部和尾部 | ||
- `disabledDays` 现在支持函数 | ||
### 非兼容性更新 | ||
* 重构代码. 如果你自己hack过代码可能会失效 | ||
* `format` 默认值由 yyyy-MM-dd 改成 YYYY-MM-DD, 现在格式类似moment.js. 不支持小写的yyyy | ||
* 移除了`custom-formatter` | ||
* `editable` 默认由false改成true, 现在日历范围也支持手动修改 | ||
* 当选择年或月的面板的时候不会修改日期(因为当设置了`not-before`或者`not-after`的时候会引发很多问题和bug) | ||
- 重构代码. 如果你自己 hack 过代码可能会失效 | ||
- `format` 默认值由 yyyy-MM-dd 改成 YYYY-MM-DD, 现在格式类似 moment.js. 不支持小写的 yyyy | ||
- 移除了`custom-formatter` | ||
- `editable` 默认由 false 改成 true, 现在日历范围也支持手动修改 | ||
- 当选择年或月的面板的时候不会修改日期(因为当设置了`not-before`或者`not-after`的时候会引发很多问题和 bug) |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DatePicker=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(r,!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e){return o(e)?new Date(e.getTime()):null==e?new Date(NaN):new Date(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>=0&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var n=s(e),a=(n.getDay()+7-t)%7;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,a=void 0===n?0:n,r=t.firstWeekContainsDate,i=void 0===r?1:r;if(!(i>=1&&i<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7");for(var o=s(e),u=o.getFullYear(),c=new Date(0),d=u+1;d>=u-1&&(c.setFullYear(d,0,i),c.setHours(0,0,0,0),c=l(c,a),!(o.getTime()>=c.getTime()));d--);return c}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,a=void 0===n?0:n,r=t.firstWeekContainsDate,i=void 0===r?1:r,o=s(e),c=l(o,a),d=u(o,{firstDayOfWeek:a,firstWeekContainsDate:i}),h=c.getTime()-d.getTime();return Math.round(h/6048e5)+1}var d={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},h=/\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;function f(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="".concat(Math.abs(e)),a=e<0?"-":"";n.length<t;)n="0".concat(n);return a+n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",a=Math.abs(e),r=a%60;return n+f(Math.floor(a/60),2)+t+f(r,2)}var m=function(e,t,n){var a=e<12?"AM":"PM";return n?a.toLocaleLowerCase():a},v={Y:function(e){var t=e.getFullYear();return t<=9999?"".concat(t):"+".concat(t)},YY:function(e){return f(e.getFullYear(),4).substr(2)},YYYY:function(e){return f(e.getFullYear(),4)},M:function(e){return e.getMonth()+1},MM:function(e){return f(e.getMonth()+1,2)},MMM:function(e,t){return t.monthsShort[e.getMonth()]},MMMM:function(e,t){return t.months[e.getMonth()]},D:function(e){return e.getDate()},DD:function(e){return f(e.getDate(),2)},H:function(e){return e.getHours()},HH:function(e){return f(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(){var e=v.h.apply(v,arguments);return f(e,2)},m:function(e){return e.getMinutes()},mm:function(e){return f(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return f(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return f(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return f(e.getMilliseconds(),3)},d:function(e){return e.getDay()},dd:function(e,t){return t.weekdaysMin[e.getDay()]},ddd:function(e,t){return t.weekdaysShort[e.getDay()]},dddd:function(e,t){return t.weekdays[e.getDay()]},A:function(e,t){return(t.meridiem||m)(e.getHours(),e.getMinutes(),!1)},a:function(e,t){return(t.meridiem||m)(e.getHours(),e.getMinutes(),!0)},Z:function(e){return p(e.getTimezoneOffset(),":")},ZZ:function(e){return p(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()},w:function(e,t){return c(e,{firstDayOfWeek:t.firstDayOfWeek,firstWeekContainsDate:t.firstWeekContainsDate})},ww:function(e,t){return f(v.w(e,t),2)}};function y(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",i=s(e);if(!o(n=i)||isNaN(n.getTime()))return"Invalid Date";var l=a.locale||d;return r.replace(h,(function(e,t){return t||("function"==typeof v[e]?"".concat(v[e](i,l)):e)}))}function g(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=/(\[[^\[]*\])|(MM?M?M?|Do|DD?|ddd?d?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|S{1,3}|x|X|ZZ?|.)/g,T=/\d/,k=/\d\d/,_=/\d\d?/,M=/[+-]?\d+/,x=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,V={},O=function(e,t,n){var a,r=Array.isArray(e)?e:[e];a="string"==typeof n?function(e){var t=parseInt(e,10);return C({},n,t)}:n,r.forEach((function(e){V[e]=[t,a]}))},Y=function(e,t){return function(n,a){var r=a[e];if(!Array.isArray(r))throw new Error("Locale[".concat(e,"] need an array"));var i=r.indexOf(n);if(i<0)throw new Error("Invalid Word");return C({},t,i)}};function F(){for(var e,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=n[0];return r<100&&r>=0?(n[0]+=400,e=new Date(Date.UTC.apply(Date,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(r)):e=new Date(Date.UTC.apply(Date,n)),e}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var a=n.locale,r=void 0===a?d:a,i=n.backupDate,o=void 0===i?new Date:i,s=function(e,t,n){var a=t.match(S);if(!a)throw new Error;for(var r=a.length,i={},o=0;o<r;o+=1){var s=a[o],l=V[s];if(l){var u="function"==typeof l[0]?l[0](n):l[0],c=l[1],d=(u.exec(e)||[])[0];i=b({},i,{},c(d,n)),e=e.replace(d,"")}else{var h=s.replace(/^\[|\]$/g,"");if(0!==e.indexOf(h))throw new Error("not match");e=e.substr(h.length)}}return i}(e,t,r),l=s.year,c=s.month,h=s.day,f=s.date,p=s.offset,m=s.weekday,v=s.week;if(f)return f;var y=[l,c,h,s.hour,s.minute,s.second,s.millisecond];if(y[3]=function(e,t){if(void 0!==e&&void 0!==t)if(t){if(e<12)return e+12}else if(12===e)return 0;return e}(y[3],s.isPM),void 0!==v&&void 0===c&&void 0===h){var w=u(void 0===l?o:new Date(l,3),{firstDayOfWeek:r.firstDayOfWeek,firstWeekContainsDate:r.firstWeekContainsDate});return new Date(w.getTime()+7*(v-1)*24*3600*1e3)}var D=F.apply(void 0,g(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=[0,0,1,0,0,0,0],a=[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],r=!0,i=0;i<7;i++)void 0===e[i]?n[i]=r?a[i]:n[i]:(n[i]=e[i],r=!1);return n}(y,o))),C=60*(void 0===p?D.getTimezoneOffset():p)*1e3,T=new Date(D.getTime()+C);return void 0!==m&&T.getDay()!==m?new Date(NaN):T}catch(e){return new Date(NaN)}}function A(e){var t=new Date(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:0);return e<100&&e>=0&&t.setFullYear(e),t}function N(e){return e instanceof Date&&!isNaN(e)}function H(e){return Array.isArray(e)&&2===e.length&&e.every(N)&&e[0]<=e[1]}function I(e){for(var t=new Date(e),n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return N(t)?t:I.apply(void 0,a)}function $(e,t){if(!Array.isArray(e))return[];var n=[],a=e.length,r=0;for(t=t||a;r<a;)n.push(e.slice(r,r+=t));return n}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function j(e,t){if(!E(e))return{};Array.isArray(t)||(t=[t]);var n={};return t.forEach((function(t){t in e&&(n[t]=e[t])})),n}O("Y",M,"year"),O("YY",k,(function(e){var t=(new Date).getFullYear(),n=Math.floor(t/100),a=parseInt(e,10);return C({},"year",a=100*(a>68?n-1:n)+a)})),O("YYYY",/\d{4}/,"year"),O("M",_,(function(e){return C({},"month",parseInt(e,10)-1)})),O("MM",k,(function(e){return C({},"month",parseInt(e,10)-1)})),O("MMM",x,Y("monthsShort","month")),O("MMMM",x,Y("months","month")),O("D",_,"day"),O("DD",k,"day"),O(["H","h"],_,"hour"),O(["HH","hh"],k,"hour"),O("m",_,"minute"),O("mm",k,"minute"),O("s",_,"second"),O("ss",k,"second"),O("S",T,(function(e){return C({},"millisecond",100*parseInt(e,10))})),O("SS",k,(function(e){return C({},"millisecond",10*parseInt(e,10))})),O("SSS",/\d{3}/,"millisecond"),O(["A","a"],(function(e){return e.meridiemParse||/[ap]\.?m?\.?/i}),(function(e,t){return{isPM:"function"==typeof t.isPM?t.isPM(e):function(e){return"p"==="".concat(e).toLowerCase().charAt(0)}(e)}})),O(["Z","ZZ"],/[+-]\d\d:?\d\d/,(function(e){return{offset:(t=e,n=D(t.match(/([+-]|\d\d)/g)||["-","0","0"],3),a=n[0],r=n[2],i=60*parseInt(n[1],10)+parseInt(r,10),0===i?0:"+"===a?-i:+i)};var t,n,a,r,i})),O("x",M,(function(e){return{date:new Date(parseInt(e,10))}})),O("X",/[+-]?\d+(\.\d{1,3})?/,(function(e){return{date:new Date(1e3*parseFloat(e))}})),O("d",T,"weekday"),O("dd",x,Y("weekdaysMin","weekday")),O("ddd",x,Y("weekdaysShort","weekday")),O("dddd",x,Y("weekdays","weekday")),O("w",_,"week"),O("ww",k,"week");var W,L=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},e.exports=t.default})),B=(W=L)&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W,R="en",q={};function z(e,t,n){return"string"!=typeof e?q[R]:(q[e]&&(a=e),t&&(q[e]=t,a=e),n||(R=a),q[e]||q[R]);var a}function J(e){return z(e,null,!0)}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e&&e!==t?e.scrollHeight>e.clientHeight?e:U(e.parentNode,t):null}q[R]={formatLocale:B,yearFormat:"YYYY",monthFormat:"MMM",monthBeforeYear:!0};var Z={name:"Popup",props:{visible:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0},inline:{type:Boolean,default:!1}},data:function(){return{top:"",left:""}},watch:{visible:{immediate:!0,handler:function(e){var t=this;this.$nextTick((function(){e&&t.displayPopup()}))}}},mounted:function(){var e=this;if(!this.inline){this.appendToBody&&document.body.appendChild(this.$el),this._clickoutEvent="ontouchend"in document?"touchstart":"mousedown",document.addEventListener(this._clickoutEvent,this.handleClickOutside);var t,n,a=this.$parent.$el;this._displayPopup=(t=function(){return e.displayPopup()},n=!1,function(){for(var e=this,a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];n||(n=!0,requestAnimationFrame((function(){n=!1,t.apply(e,r)})))}),this._scrollParent=U(a)||window,this._scrollParent.addEventListener("scroll",this._displayPopup),window.addEventListener("resize",this._displayPopup)}},beforeDestroy:function(){this.inline||(this.appendToBody&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),document.removeEventListener(this._clickoutEvent,this.handleClickOutside),this._scrollParent.removeEventListener("scroll",this._displayPopup),window.removeEventListener("resize",this._displayPopup))},methods:{handleClickOutside:function(e){if(this.visible){var t=this.$el;t&&!t.contains(e.target)&&this.$emit("clickoutside",e)}},displayPopup:function(){if(!this.inline&&this.visible){var e=this.$parent.$el,t=this.appendToBody;this._popupRect||(this._popupRect=function(e){var t=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";var a=window.getComputedStyle(e),r=e.offsetWidth+parseInt(a.marginLeft,10)+parseInt(a.marginRight,10),i=e.offsetHeight+parseInt(a.marginTop,10)+parseInt(a.marginBottom,10);return e.style.display=t,e.style.visibility=n,{width:r,height:i}}(this.$el));var n=this._popupRect,a=function(e,t,n,a){var r=0,i=0,o=0,s=e.getBoundingClientRect(),l=document.documentElement.clientWidth,u=document.documentElement.clientHeight;return a&&(i=window.pageXOffset+s.left,o=window.pageYOffset+s.top),r=s.top<=n&&u-s.bottom<=n?o+u-s.top-n:s.top+s.height/2<=u/2?o+s.height:o-n,{left:"".concat(l-s.left<t&&s.right<t?i-s.left+1:s.left+s.width/2<=l/2?i:i+s.width-t,"px"),top:"".concat(r,"px")}}(e,n.width,n.height,t),r=a.top;this.left=a.left,this.top=r}}},render:function(){var e=arguments[0];return this.inline?e("div",[this.$slots.default]):e("transition",{attrs:{name:"mx-zoom-in-down"}},[this.visible&&e("div",{class:"mx-datepicker-popup",style:{top:this.top,left:this.left}},[this.$slots.default])])}};function X(e,t,n,a,r,i,o,s,l,u){"boolean"!=typeof o&&(l=s,s=o,o=!1);var c,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),a&&(d._scopeId=a),i?d._ssrRegister=c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)}:t&&(c=o?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return n}"undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());var K=function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M940.218182 107.054545h-209.454546V46.545455h-65.163636v60.50909H363.054545V46.545455H297.890909v60.50909H83.781818c-18.618182 0-32.581818 13.963636-32.581818 32.581819v805.236363c0 18.618182 13.963636 32.581818 32.581818 32.581818h861.090909c18.618182 0 32.581818-13.963636 32.581818-32.581818V139.636364c-4.654545-18.618182-18.618182-32.581818-37.236363-32.581819zM297.890909 172.218182V232.727273h65.163636V172.218182h307.2V232.727273h65.163637V172.218182h176.872727v204.8H116.363636V172.218182h181.527273zM116.363636 912.290909V442.181818h795.927273v470.109091H116.363636z"}})])};K._withStripped=!0;var G=X({render:K,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Q=function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M810.005333 274.005333l-237.994667 237.994667 237.994667 237.994667-60.010667 60.010667-237.994667-237.994667-237.994667 237.994667-60.010667-60.010667 237.994667-237.994667-237.994667-237.994667 60.010667-60.010667 237.994667 237.994667 237.994667-237.994667z"}})])};Q._withStripped=!0;var ee=X({render:Q,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0);function te(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object.prototype.toString.call(t);return t instanceof Date||"object"===e(t)&&"[object Date]"===n?new Date(t.getTime()):"number"==typeof t||"[object Number]"===n?new Date(t):("string"!=typeof t&&"[object String]"!==n||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function ne(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ae(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e);return t.setHours(0,0,0,0),t}function re(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e),n=t.getFullYear(),a=t.getMonth(),r=new Date(0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function ie(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),a=ne(t),r=n.getMonth()+a,i=new Date(0);i.setFullYear(n.getFullYear(),r,1),i.setHours(0,0,0,0);var o=re(i);return n.setMonth(r,Math.min(o,n.getDate())),n}function oe(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ie(e,12*ne(t))}function se(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function le(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ue(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),a=ne(t),r=n.getFullYear(),i=n.getDate(),o=new Date(0);o.setFullYear(r,a,15),o.setHours(0,0,0,0);var s=re(o);return n.setMonth(a,Math.min(i,s)),n}function ce(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),a=ne(t);return isNaN(n)?new Date(NaN):(n.setFullYear(a),n)}function de(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ie(e,-ne(t))}var he={inject:{locale:{default:J()}},methods:{t:function(e){for(var t,n=e.split("."),a=this.locale||J(),r=0,i=n.length;r<i;r++){if(t=a[n[r]],r===i-1)return t;if(!t)return null;a=t}return null}}},fe={mixins:[he],methods:{formatDate:function(e,t){return y(e,t,{locale:this.t("formatLocale")})}}},pe={name:"TableDate",mixins:[he,fe],props:{calendarYear:{type:Number,default:function(){return(new Date).getFullYear()}},calendarMonth:{type:Number,default:function(){return(new Date).getMonth()}},showWeekNumber:{type:Boolean,default:!1},titleFormat:{type:String,default:"YYYY-MM-DD"},getRowClasses:{type:Function,default:function(){return[]}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{firstDayOfWeek:function(){return this.t("formatLocale.firstDayOfWeek")||0},days:function(){var e=this.t("days")||this.t("formatLocale.weekdaysMin");return e.concat(e).slice(this.firstDayOfWeek,this.firstDayOfWeek+7)},dates:function(){for(var e=[],t=this.firstDayOfWeek,n=this.calendarMonth,a=A(this.calendarYear,n,0),r=a.getDate(),i=r-(a.getDay()+7-t)%7,o=i;o<=r;o++){e.push({day:o-r,text:o})}a.setMonth(n+1,0);for(var s=a.getDate(),l=1;l<=s;l++)e.push({day:l,text:l});for(var u=42-(r-i+1)-s,c=1;c<=u;c++)e.push({day:s+c,text:c});return $(e,7)}},methods:{handleCellClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-day");n&&this.$emit("select",parseInt(n,10))},getCellTitle:function(e){var t=this.titleFormat,n=A(this.calendarYear,this.calendarMonth,e);return this.formatDate(n,t)},getWeekNumber:function(e){return c(A(this.calendarYear,this.calendarMonth,e),this.t("formatLocale"))}}},me=function(){var e=this,t=e._self._c||e.$createElement;return t("table",{staticClass:"mx-table mx-table-date"},[t("thead",[t("tr",[e.showWeekNumber?t("th",{staticClass:"mx-week-number-header"}):e._e(),e._v(" "),e._l(e.days,(function(n){return t("th",{key:n},[e._v(e._s(n))])}))],2)]),e._v(" "),t("tbody",{on:{click:e.handleCellClick}},e._l(e.dates,(function(n,a){return t("tr",{key:a,staticClass:"mx-date-row",class:e.getRowClasses(n)},[e.showWeekNumber?t("td",{staticClass:"mx-week-number"},[e._v("\n "+e._s(e.getWeekNumber(n[0].day))+"\n ")]):e._e(),e._v(" "),e._l(n,(function(n,a){return t("td",{key:a,staticClass:"cell",class:e.getCellClasses(n.day),attrs:{"data-day":n.day,title:e.getCellTitle(n.day)}},[t("div",[e._v(e._s(n.text))])])}))],2)})),0)])};me._withStripped=!0;var ve=X({render:me,staticRenderFns:[]},void 0,pe,void 0,!1,void 0,!1,void 0,void 0,void 0),ye={name:"TableMonth",mixins:[he],props:{getCellClasses:{type:Function,default:function(){return[]}}},computed:{months:function(){var e=(this.t("months")||this.t("formatLocale.monthsShort")).map((function(e,t){return{text:e,month:t}}));return $(e,3)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-month");n&&this.$emit("select",parseInt(n,10))}}},ge=function(){var e=this,t=e._self._c||e.$createElement;return t("table",{staticClass:"mx-table mx-table-month",on:{click:e.handleClick}},e._l(e.months,(function(n,a){return t("tr",{key:a},e._l(n,(function(n,a){return t("td",{key:a,staticClass:"cell",class:e.getCellClasses(n.month),attrs:{"data-month":n.month}},[t("div",[e._v(e._s(n.text))])])})),0)})),0)};ge._withStripped=!0;var we=X({render:ge,staticRenderFns:[]},void 0,ye,void 0,!1,void 0,!1,void 0,void 0,void 0),be={name:"TableYear",props:{decade:Number,getCellClasses:{type:Function,default:function(){return[]}}},computed:{years:function(){for(var e=this.decade,t=[],n=0;n<10;n++)t.push(e+n);return $(t,2)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-year");n&&this.$emit("select",parseInt(n,10))}}},De=function(){var e=this,t=e._self._c||e.$createElement;return t("table",{staticClass:"mx-table mx-table-year",on:{click:e.handleClick}},e._l(e.years,(function(n,a){return t("tr",{key:a},e._l(n,(function(n,a){return t("td",{key:a,staticClass:"cell",class:e.getCellClasses(n),attrs:{"data-year":n}},[t("div",[e._v(e._s(n))])])})),0)})),0)};De._withStripped=!0;var Ce={name:"CalendarPanel",components:{TableDate:ve,TableMonth:we,TableYear:X({render:De,staticRenderFns:[]},void 0,be,void 0,!1,void 0,!1,void 0,void 0,void 0)},mixins:[he,fe],props:{value:{},defaultValue:{type:[Date,Number],default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},disabledDate:{type:Function,default:function(){return!1}},type:{type:String,default:"date"},getClasses:{type:Function,default:function(){return[]}},showWeekNumber:{type:Boolean,default:void 0},titleFormat:{type:String,default:"YYYY-MM-DD"},calendar:Date,partialUpdate:{type:Boolean,default:!1}},data:function(){return{panel:-1!==["date","year","month"].indexOf(this.type)?this.type:"date",innerCalendar:null}},computed:{innerValue:function(){var e=Array.isArray(this.value)?this.value:[this.value],t={year:le,month:se,date:ae},n=t[this.type]||t.date;return e.filter(N).map((function(e){return n(e)}))},calendarYear:function(){return this.innerCalendar.getFullYear()},calendarMonth:function(){return this.innerCalendar.getMonth()},calendarDecade:function(){return 10*Math.floor(this.calendarYear/10)},showIconDoubleArrow:function(){return"date"===this.panel||"month"===this.panel||"year"===this.panel},showIconArrow:function(){return"date"===this.panel},dateHeader:function(){var e=this.t("monthBeforeYear"),t=this.t("yearFormat"),n=this.t("monthFormat")||"MMM",a={panel:"year",label:this.formatDate(this.innerCalendar,t)},r={panel:"month",label:this.formatDate(this.innerCalendar,n)};return e?[r,a]:[a,r]}},watch:{value:{immediate:!0,handler:"initCalendar"},calendar:{handler:"initCalendar"},defaultValue:{handler:"initCalendar"}},methods:{initCalendar:function(){var e=this.calendar;N(e)||(e=I(this.innerValue[0],this.defaultValue)),this.innerCalendar=e},emitDate:function(e,t){this.disabledDate(new Date(e))||this.$emit("select",e,t)},updateCalendar:function(e){this.innerCalendar=e,this.$emit("update:calendar",e)},handelPanelChange:function(e){this.panel=e},handleIconLeftClick:function(){var e=de(this.innerCalendar,1);this.updateCalendar(e)},handleIconRightClick:function(){var e=ie(this.innerCalendar,1);this.updateCalendar(e)},handleIconDoubleLeftClick:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return oe(e,-ne(t))}(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e)},handleIconDoubleRightClick:function(){var e=oe(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e)},handleSelectYear:function(e){if("year"===this.type){var t=this.getCellDate(e,"year");this.emitDate(t,"year")}else{var n=ce(this.innerCalendar,e);if(this.updateCalendar(n),this.handelPanelChange("month"),this.partialUpdate&&this.innerValue[0]){var a=ce(this.innerValue[0],e);this.emitDate(a,"year")}}},handleSelectMonth:function(e){if("month"===this.type){var t=this.getCellDate(e,"month");this.emitDate(t,"month")}else{var n=ue(this.innerCalendar,e);if(this.updateCalendar(n),this.handelPanelChange("date"),this.partialUpdate&&this.innerValue[0]){var a=ue(ce(this.innerValue[0],this.calendarYear),e);this.emitDate(a,"month")}}},handleSelectDate:function(e){var t=this.getCellDate(e,"date");this.emitDate(t,"week"===this.type?"week":"date")},getCellDate:function(e,t){return"year"===t?A(e,0):"month"===t?A(this.calendarYear,e):A(this.calendarYear,this.calendarMonth,e)},getDateClasses:function(e){var t=this.getCellDate(e,"date"),n=t.getMonth()!==this.calendarMonth,a=[];t.getTime()===(new Date).setHours(0,0,0,0)&&a.push("today"),n&&a.push("not-current-month");var r=this.getStateClass(t);return"active"===r&&n||a.push(r),a.concat(this.getClasses(t,this.innerValue,a.join(" ")))},getMonthClasses:function(e){if("month"!==this.type)return this.calendarMonth===e?"active":"";var t=[],n=this.getCellDate(e,"month");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getYearClasses:function(e){if("year"!==this.type)return this.calendarYear===e?"active":"";var t=[],n=this.getCellDate(e,"year");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getStateClass:function(e){return this.disabledDate(new Date(e))?"disabled":this.innerValue.some((function(t){return t.getTime()===e.getTime()}))?"active":""},getWeekState:function(e){if("week"!==this.type)return"";var t=this.getCellDate(e[0].day,"date").getTime(),n=this.getCellDate(e[6].day,"date").getTime();return this.innerValue.some((function(e){var a=e.getTime();return a>=t&&a<=n}))?"mx-active-week":""}}},Se=function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:["mx-calendar","mx-calendar-panel-"+e.panel,{"mx-calendar-week-mode":"week"===e.type}]},[t("div",{staticClass:"mx-calendar-header"},[t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconDoubleArrow,expression:"showIconDoubleArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-double-left",on:{click:e.handleIconDoubleLeftClick}},[t("i",{staticClass:"mx-icon-double-left"})]),e._v(" "),t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconArrow,expression:"showIconArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-left",on:{click:e.handleIconLeftClick}},[t("i",{staticClass:"mx-icon-left"})]),e._v(" "),t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconDoubleArrow,expression:"showIconDoubleArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-double-right",on:{click:e.handleIconDoubleRightClick}},[t("i",{staticClass:"mx-icon-double-right"})]),e._v(" "),t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconArrow,expression:"showIconArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-right",on:{click:e.handleIconRightClick}},[t("i",{staticClass:"mx-icon-right"})]),e._v(" "),t("span",{staticClass:"mx-calendar-header-label"},["year"===e.panel?[t("span",[e._v(e._s(e.calendarDecade))]),e._v(" "),t("span",{staticClass:"mx-calendar-decade-separator"}),e._v(" "),t("span",[e._v(e._s(e.calendarDecade+9))])]:"month"===e.panel?t("button",{staticClass:"mx-btn mx-btn-text",on:{click:function(t){return e.handelPanelChange("year")}}},[e._v("\n "+e._s(e.calendarYear)+"\n ")]):"date"===e.panel?e._l(e.dateHeader,(function(n){return t("button",{key:n.panel,class:"mx-btn mx-btn-text mx-btn-current-"+n.panel,on:{click:function(t){return e.handelPanelChange(n.panel)}}},[e._v("\n "+e._s(n.label)+"\n ")])})):e._e()],2)]),e._v(" "),t("div",{staticClass:"mx-calendar-content"},[t("table-year",{directives:[{name:"show",rawName:"v-show",value:"year"===e.panel,expression:"panel === 'year'"}],attrs:{decade:e.calendarDecade,"get-cell-classes":e.getYearClasses},on:{select:e.handleSelectYear}}),e._v(" "),"year"!==e.type?t("table-month",{directives:[{name:"show",rawName:"v-show",value:"month"===e.panel,expression:"panel === 'month'"}],attrs:{"get-cell-classes":e.getMonthClasses},on:{select:e.handleSelectMonth}}):e._e(),e._v(" "),"year"!==e.type&&"month"!==e.type?t("table-date",{directives:[{name:"show",rawName:"v-show",value:"date"===e.panel,expression:"panel === 'date'"}],attrs:{"calendar-year":e.calendarYear,"calendar-month":e.calendarMonth,"title-format":e.titleFormat,"show-week-number":"boolean"==typeof e.showWeekNumber?e.showWeekNumber:"week"===e.type,"get-cell-classes":e.getDateClasses,"get-row-classes":e.getWeekState},on:{select:e.handleSelectDate}}):e._e()],1)])};Se._withStripped=!0;var Te,ke=X({render:Se,staticRenderFns:[]},void 0,Ce,void 0,!1,void 0,!1,void 0,void 0,void 0),_e={name:"CalendarRange",components:{CalendarPanel:ke},props:r({},ke.props),data:function(){return{innerValue:[],calendars:[]}},computed:{calendarMinDiff:function(){var e={date:1,month:12,year:120};return e[this.type]||e.date},calendarMaxDiff:function(){return Infinity}},watch:{value:{immediate:!0,handler:function(){var e=this;this.innerValue=H(this.value)?this.value:[new Date(NaN),new Date(NaN)],this.calendars=this.innerValue.map((function(t){return I(t,e.defaultValue)})),this.validateCalendars(1)}}},methods:{handleSelect:function(e,t){var n=i(this.innerValue,2),a=n[0],r=n[1];N(a)&&!N(r)?(this.innerValue=a.getTime()>e.getTime()?[e,a]:[a,e],this.emitDate(this.innerValue,t)):this.innerValue=[e,new Date(NaN)]},emitDate:function(e,t){this.$emit("select",e,t)},updateStartCalendar:function(e){this.calendars.splice(0,1,e),this.validateCalendars(1)},updateEndCalendar:function(e){this.calendars.splice(1,1,e),this.validateCalendars(0)},validateCalendars:function(e){var t=this.getCalendarGap();if(t){var n=this.calendars[e];n=0===e?de(n,t):ie(n,t),this.calendars.splice(e,1,n)}},getCalendarGap:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),a=te(t);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}(this.calendars[1],this.calendars[0]),t=this.calendarMinDiff,n=this.calendarMaxDiff;return e<t?t-e:e>n?n-e:0},getRangeClasses:function(e,t,n){return!/disabled|active|not-current-month/.test(n)&&2===t.length&&e.getTime()>t[0].getTime()&&e.getTime()<t[1].getTime()?"in-range":""}},render:function(){var e=this,t=arguments[0],n=this.calendars.map((function(n,a){var i=r({},e.$props,{calendar:n,value:e.innerValue,getClasses:e.getRangeClasses,partialUpdate:!1});return t("calendar-panel",{props:i,on:{select:e.handleSelect,"update:calendar":0===a?e.updateStartCalendar:e.updateEndCalendar}})}));return t("div",{class:"mx-range-wrapper"},[n])}};var Me={data:function(){return{scrollbarWidth:0,thumbTop:"",thumbHeight:""}},created:function(){this.scrollbarWidth=function(){if("undefined"==typeof window)return 0;if(void 0!==Te)return Te;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=document.createElement("div");return t.style.width="100%",e.appendChild(t),Te=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),Te}(),document.addEventListener("mouseup",this.handleDragend)},beforeDestroy:function(){document.addEventListener("mouseup",this.handleDragend)},mounted:function(){this.$nextTick(this.getThumbSize)},methods:{getThumbSize:function(){var e=this.$refs.wrap;if(e){var t=100*e.clientHeight/e.scrollHeight;this.thumbHeight=t<100?"".concat(t,"%"):""}},handleScroll:function(e){var t=e.currentTarget;this.thumbTop="".concat(100*t.scrollTop/t.scrollHeight,"%")},handleDragstart:function(e){e.stopImmediatePropagation(),this._draggable=!0,this._prevY=e.clientY-this.$refs.thumb.offsetTop,document.addEventListener("mousemove",this.handleDraging)},handleDraging:function(e){if(this._draggable){var t=this.$refs.wrap;t.scrollTop=(e.clientY-this._prevY)*t.scrollHeight/t.clientHeight}},handleDragend:function(){this._draggable&&(this._draggable=!1,document.removeEventListener("mousemove",this.handleDraging))}}},xe=function(){var e=this._self._c||this.$createElement;return e("div",{staticClass:"mx-scrollbar",style:{position:"relative",overflow:"hidden"}},[e("div",{ref:"wrap",staticClass:"mx-scrollbar-wrap",style:{marginRight:"-"+this.scrollbarWidth+"px"},on:{scroll:this.handleScroll}},[this._t("default")],2),this._v(" "),e("div",{staticClass:"mx-scrollbar-track"},[e("div",{ref:"thumb",staticClass:"mx-scrollbar-thumb",style:{height:this.thumbHeight,top:this.thumbTop},on:{mousedown:this.handleDragstart}})])])};xe._withStripped=!0;var Ve=X({render:xe,staticRenderFns:[]},void 0,Me,void 0,!1,void 0,!1,void 0,void 0,void 0),Oe=function(e){return(e=parseInt(e,10))<10?"0".concat(e):"".concat(e)},Ye=function(e,t,n){if(Array.isArray(n))return n.filter((function(t){return t>=0&&t<e}));t<=0&&(t=1);for(var a=[],r=0;r<e;r+=t)a.push(r);return a},Fe=function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(a<=0)requestAnimationFrame((function(){t.scrollTop=n}));else{var r=n-t.scrollTop,i=r/a*10;requestAnimationFrame((function(){var r=t.scrollTop+i;r>=n?t.scrollTop=n:(t.scrollTop=r,e(t,n,a-10))}))}},Pe={name:"ListColumns",components:{ScrollbarVertical:Ve},props:{date:Date,getClasses:{type:Function,default:function(){return[]}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},use12h:{type:Boolean,default:!1}},computed:{columns:function(){var e=[];return this.showHour&&e.push({type:"hour",list:this.getHoursList()}),this.showMinute&&e.push({type:"minute",list:this.getMinutesList()}),this.showSecond&&e.push({type:"second",list:this.getSecondsList()}),this.use12h&&e.push({type:"ampm",list:this.getAMPMList()}),e.filter((function(e){return e.list.length>0}))}},watch:{date:{handler:function(){var e=this;this.$nextTick((function(){e.scrollToSelected(100)}))}}},mounted:function(){this.scrollToSelected(0)},methods:{getHoursList:function(){var e=this;return Ye(this.use12h?12:24,this.hourStep,this.hourOptions).map((function(t){var n=new Date(e.date),a=Oe(t);return e.use12h&&(0===t&&(a="12"),n.getHours()>=12&&(t+=12)),{value:n.setHours(t),text:a}}))},getMinutesList:function(){var e=this;return Ye(60,this.minuteStep,this.minuteOptions).map((function(t){return{value:new Date(e.date).setMinutes(t),text:Oe(t)}}))},getSecondsList:function(){var e=this;return Ye(60,this.secondStep,this.secondOptions).map((function(t){return{value:new Date(e.date).setSeconds(t),text:Oe(t)}}))},getAMPMList:function(){var e=this;return["AM","PM"].map((function(t,n){var a=new Date(e.date);return{text:t,value:a.setHours(a.getHours()%12+12*n)}}))},scrollToSelected:function(e){for(var t=this.$el.querySelectorAll(".active"),n=0;n<t.length;n++){var a=t[n],r=U(a,this.$el);if(r)Fe(r,a.offsetTop,e)}},handleSelect:function(e){var t=e.target,n=e.currentTarget;if("LI"===t.tagName.toUpperCase()){var a=n.getAttribute("data-type"),r=parseInt(n.getAttribute("data-index"),10),i=parseInt(t.getAttribute("data-index"),10);this.$emit("select",this.columns[r].list[i].value,a)}}}},Ae=function(){var e=this,t=e._self._c||e.$createElement;return t("div",{staticClass:"mx-time-columns"},e._l(e.columns,(function(n,a){return t("scrollbar-vertical",{key:a,staticClass:"mx-time-column"},[t("ul",{attrs:{"data-type":n.type,"data-index":a},on:{click:e.handleSelect}},e._l(n.list,(function(n,a){return t("li",{key:n.value,staticClass:"cell",class:e.getClasses(n.value),attrs:{"data-index":a}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)])})),1)};Ae._withStripped=!0;var Ne=X({render:Ae,staticRenderFns:[]},void 0,Pe,void 0,!1,void 0,!1,void 0,void 0,void 0);function He(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(":");return e.length>=2?{hours:parseInt(e[0],10),minutes:parseInt(e[1],10)}:null}var Ie={name:"ListOptions",components:{ScrollbarVertical:Ve},mixins:[he,fe],props:{date:Date,options:{type:[Object,Function],default:function(){return[]}},format:{type:String,default:"HH:mm:ss"},getClasses:{type:Function,default:function(){return[]}}},computed:{list:function(){var e=[],t=this.options;if("function"==typeof t)return t()||[];var n=He(t.start),a=He(t.end),r=He(t.step),i=t.format||this.format;if(n&&a&&r)for(var o=n.minutes+60*n.hours,s=r.minutes+60*r.hours,l=Math.floor((a.minutes+60*a.hours-o)/s),u=0;u<=l;u++){var c=o+u*s,d=Math.floor(c/60),h=c%60,f=new Date(this.date).setHours(d,h,0);e.push({value:f,text:this.formatDate(f,i)})}return e}},mounted:function(){this.scrollToSelected()},methods:{scrollToSelected:function(){var e=this.$el.querySelector(".active");if(e){var t=U(e,this.$el);if(t)!function(e,t){e&&(e.scrollTop=t)}(t,e.offsetTop)}},handleSelect:function(e){this.$emit("select",e,"time")}}},$e=function(){var e=this,t=e._self._c||e.$createElement;return t("scrollbar-vertical",[t("ul",{staticClass:"mx-time-list"},e._l(e.list,(function(n){return t("li",{key:n.value,staticClass:"cell",class:e.getClasses(n.value),on:{click:function(t){return e.handleSelect(n.value)}}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)])};$e._withStripped=!0;var Ee={name:"TimePanel",components:{ListColumns:Ne,ListOptions:X({render:$e,staticRenderFns:[]},void 0,Ie,void 0,!1,void 0,!1,void 0,void 0,void 0)},mixins:[he,fe],props:{value:{},defaultValue:{type:[Date,Number],default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},format:{type:String,default:"HH:mm:ss"},timeTitleFormat:{type:String,default:"YYYY-MM-DD"},showTimeHeader:{type:Boolean,default:!1},disabledTime:{type:Function,default:function(){return!1}},timePickerOptions:{type:[Object,Function],default:function(){return null}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12h:{type:Boolean,default:void 0}},computed:{innerValue:function(){return I(this.value,this.defaultValue)},title:function(){var e=this.timeTitleFormat,t=new Date(this.innerValue);return this.formatDate(t,e)},ShowHourMinuteSecondAMPM:function(){var e=this,t=this.format,n={showHour:/[HhKk]/.test(t),showMinute:/m/.test(t),showSecond:/s/.test(t),use12h:/a/i.test(t)},a={};return Object.keys(n).forEach((function(t){a[t]="boolean"==typeof e[t]?e[t]:n[t]})),a}},methods:{handleSelect:function(e,t){var n=new Date(e);this.disabledTime(new Date(e))||this.$emit("select",n,t)},handleClickTitle:function(){this.$emit("title-click")},getClasses:function(e){var t=new Date(e);return this.disabledTime(new Date(e))?"disabled":t.getTime()===this.innerValue.getTime()?"active":""}}},je=function(){var e=this,t=e._self._c||e.$createElement;return t("div",{staticClass:"mx-time"},[e.showTimeHeader?t("div",{staticClass:"mx-time-header"},[t("button",{staticClass:"mx-btn mx-btn-text mx-time-header-title",on:{click:e.handleClickTitle}},[e._v("\n "+e._s(e.title)+"\n ")])]):e._e(),e._v(" "),t("div",{staticClass:"mx-time-content"},[e.timePickerOptions?t("list-options",{attrs:{date:e.innerValue,"get-classes":e.getClasses,options:e.timePickerOptions,format:e.format},on:{select:e.handleSelect}}):t("list-columns",e._b({attrs:{date:e.innerValue,"get-classes":e.getClasses,"hour-options":e.hourOptions,"minute-options":e.minuteOptions,"second-options":e.secondOptions,"hour-step":e.hourStep,"minute-step":e.minuteStep,"second-step":e.secondStep},on:{select:e.handleSelect}},"list-columns",e.ShowHourMinuteSecondAMPM,!1))],1)])};je._withStripped=!0;var We=X({render:je,staticRenderFns:[]},void 0,Ee,void 0,!1,void 0,!1,void 0,void 0,void 0),Le={name:"TimeRange",props:r({},We.props),data:function(){return{startValue:new Date(NaN),endValue:new Date(NaN)}},watch:{value:{immediate:!0,handler:function(){if(H(this.value)){var e=i(this.value,2),t=e[1];this.startValue=e[0],this.endValue=t}else this.startValue=new Date(NaN),this.endValue=new Date(NaN)}}},methods:{emitChange:function(e,t){this.$emit("select",[this.startValue,this.endValue],e,t)},handleSelectStart:function(e,t){this.startValue=e,this.endValue.getTime()>=e.getTime()||(this.endValue=e),this.emitChange(t,0)},handleSelectEnd:function(e,t){this.endValue=e,this.startValue.getTime()<=e.getTime()||(this.startValue=e),this.emitChange(t,1)},disabledStartTime:function(e){return this.disabledTime(e,0)},disabledEndTime:function(e){return e.getTime()<this.startValue.getTime()||this.disabledTime(e,1)}},render:function(){var e=arguments[0];return e("div",{class:"mx-range-wrapper"},[e(We,{props:r({},this.$props,{value:this.startValue,disabledTime:this.disabledStartTime}),on:r({},this.$listeners,{select:this.handleSelectStart})}),e(We,{props:r({},this.$props,{value:this.endValue,disabledTime:this.disabledEndTime}),on:r({},this.$listeners,{select:this.handleSelectEnd})})])}},Be=/^(attrs|props|on|nativeOn|class|style|hook)$/,Re=function(e){return e.reduce((function(e,t){var n,a,r,i,o;for(r in t)if(a=t[r],(n=e[r])&&Be.test(r))if("class"===r&&("string"==typeof n&&(o=n,e[r]=n={},n[o]=!0),"string"==typeof a&&(o=a,t[r]=a={},a[o]=!0)),"on"===r||"nativeOn"===r||"hook"===r)for(i in a)n[i]=qe(n[i],a[i]);else if(Array.isArray(n))e[r]=n.concat(a);else if(Array.isArray(a))e[r]=[n].concat(a);else for(i in a)n[i]=a[i];else e[r]=t[r];return e}),{})};function qe(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}var ze={name:"DatetimePanel",props:r({},ke.props,{},We.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){"date"===t&&this.openTimePanel();var n=N(this.value)?this.value:new Date(this.defaultValue),a=new Date(e);a.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),this.disabledTime(new Date(a))?this.currentValue=e:this.emitDate(a,t)}},render:function(){var e=arguments[0],t={props:r({},j(this,Object.keys(ke.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:r({},j(this,Object.keys(We.props)),{showTimeHeader:!0,value:this.currentValue}),on:{select:this.emitDate,"title-click":this.closeTimePanel}};return e("div",[e(ke,t),this.timeVisible&&e(We,Re([{class:"mx-calendar-time"},n]))])}},Je={name:"DatetimeRange",props:r({},_e.props,{},Le.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){var n=this;"date"===t&&this.openTimePanel();var a=e.map((function(e,t){var a=new Date(e),r=H(n.value)?n.value[t]:new Date(n.defaultValue);return a.setHours(r.getHours(),r.getMinutes(),r.getSeconds()),a}));a[1].getTime()<a[0].getTime()&&(a=[a[0],a[0]]),a.some(this.disabledTime)?this.currentValue=e:this.emitDate(a,t)}},render:function(){var e=arguments[0],t={props:r({},j(this,Object.keys(_e.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:r({},j(this,Object.keys(Le.props)),{value:this.currentValue,showTimeHeader:!0}),on:{select:this.emitDate,"title-click":this.closeTimePanel}};return e("div",[e(_e,t),this.timeVisible&&e(Le,Re([{class:"mx-calendar-time"},n]))])}},Ue={default:ke,time:We,datetime:ze},Ze={default:_e,time:Le,datetime:Je},Xe={name:"DatePicker",components:{IconCalendar:G,IconClose:ee,Popup:Z},provide:function(){return{locale:this.locale}},props:r({},ze.props,{value:{},valueType:{type:String,default:"date"},type:{type:String,default:"date"},format:{type:[String,Object],default:function(){var e={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",year:"YYYY",month:"YYYY-MM",time:"HH:mm:ss",week:"w"};return e[this.type]||e.date}},range:{type:Boolean,default:!1},rangeSeparator:{type:String,default:" ~ "},lang:{type:[String,Object]},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},inputClass:{default:"mx-input"},inputAttr:{type:Object,default:function(){return{}}},appendToBody:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},popupClass:{},popupStyle:{type:Object,default:function(){return{}}},inline:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:"OK"},shortcuts:{type:Array,validator:function(e){return Array.isArray(e)&&e.every((function(e){return E(e)&&"string"==typeof e.text&&"function"==typeof e.onClick}))},default:function(){return[]}}}),data:function(){return{currentValue:null,userInput:null,defaultOpen:!1}},computed:{currentComponent:function(){var e=this.range?Ze:Ue;return e[this.type]||e.default},currentComponentProps:function(){return r({},j(this,Object.keys(this.currentComponent.props)),{value:this.currentValue})},popupVisible:function(){return!this.disabled&&("boolean"==typeof this.open?this.open:this.defaultOpen)},innerValue:function(){var e=this.value;return this.range?(e=Array.isArray(e)?e.slice(0,2):[null,null]).map(this.value2date):this.value2date(this.value)},text:function(){var e=this;if(null!==this.userInput)return this.userInput;if(!this.isValidValue(this.innerValue))return"";var t=this.format;return Array.isArray(this.innerValue)?this.innerValue.map((function(n){return e.formatDate(n,t)})).join(this.rangeSeparator):this.formatDate(this.innerValue,t)},showClearIcon:function(){return!this.disabled&&this.clearable&&this.text},locale:function(){return E(this.lang)?function e(n,a){if(!E(n))return{};var i=n;return E(a)&&Object.keys(a).forEach((function(o){var s=a[o];E(s)&&E(n[o])&&(s=e(n[o],s)),i=r({},i,t({},o,s))})),i}(J(),this.lang):J(this.lang)}},watch:{innerValue:{immediate:!0,handler:function(e){this.currentValue=e}}},methods:{handleClickOutSide:function(e){this.$el.contains(e.target)||this.closePopup()},parseDate:function(e,t){if(E(this.format)&&"function"==typeof this.format.parse)return this.format.parse(e,t);var n=I(this.defaultValue);return P(e,t,{locale:this.locale.formatLocale,backupDate:n})},formatDate:function(e,t){return E(this.format)&&"function"==typeof this.format.stringify?this.format.stringify(e,t):y(e,t,{locale:this.locale.formatLocale})},value2date:function(e){switch(this.valueType){case"date":return e instanceof Date?new Date(e.getTime()):new Date(NaN);case"timestamp":return"number"==typeof e?new Date(e):new Date(NaN);case"format":return"string"==typeof e?this.parseDate(e,this.format):new Date(NaN);default:return"string"==typeof e?this.parseDate(e,this.valueType):new Date(NaN)}},date2value:function(e){if(!N(e))return null;switch(this.valueType){case"date":return e;case"timestamp":return e.getTime();case"format":return this.formatDate(e,this.format);default:return this.formatDate(e,this.valueType)}},emitValue:function(e,t){var n=Array.isArray(e)?e.map(this.date2value):this.date2value(e);return this.$emit("input",n),this.$emit("change",n,t),this.afterEmitValue(t),n},afterEmitValue:function(e){e&&e!==this.type||this.closePopup()},isValidValue:function(e){return(this.range?H:N)(e)},handleSelectDate:function(e,t){this.confirm?this.currentValue=e:this.emitValue(e,t)},handleClear:function(){this.emitValue(this.range?[null,null]:null),this.$emit("clear")},handleConfirmDate:function(){var e=this.emitValue(this.currentValue);this.$emit("confirm",e)},handleSelectShortcut:function(e){if(E(e)&&"function"==typeof e.onClick){var t=e.onClick(this);t instanceof Date&&this.emitValue(t)}},openPopup:function(){this.defaultOpen=!0,this.$emit("open"),this.$emit("update:open",!0)},closePopup:function(){this.defaultOpen=!1,this.$emit("close"),this.$emit("update:open",!1)},blur:function(){this.$refs.input.blur()},focus:function(){this.$refs.input.focus()},handleInputChange:function(){var e=this;if(this.editable&&null!==this.userInput){var t=this.userInput;if(this.userInput=null,""!==t){var n=this.range?t.split(this.rangeSeparator).map((function(t){return e.parseDate(t,e.format)})):this.parseDate(t,this.format);this.isValidValue(n)?(this.emitValue(n),this.blur()):this.$emit("input-error",t)}else this.handleClear()}},handleInputInput:function(e){this.userInput=e.target.value},handleInputKeydown:function(e){var t=e.keyCode;9===t?this.closePopup():13===t&&this.handleInputChange()},handleInputBlur:function(e){this.$emit("blur",e)},handleInputFocus:function(e){this.openPopup(),this.$emit("focus",e)},hasSlot:function(e){return!(!this.$slots[e]&&!this.$scopedSlots[e])}}},Ke=function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:{"mx-datepicker":!0,"mx-datepicker-range":e.range,"mx-datepicker-inline":e.inline,disabled:e.disabled}},[e.inline?e._e():t("div",{staticClass:"mx-input-wrapper",on:{mousedown:e.openPopup,touchstart:e.openPopup}},[t("input",e._b({ref:"input",class:e.inputClass,attrs:{disabled:e.disabled,readonly:!e.editable,placeholder:e.placeholder},domProps:{value:e.text},on:{keydown:e.handleInputKeydown,focus:e.handleInputFocus,blur:e.handleInputBlur,input:e.handleInputInput,change:e.handleInputChange}},"input",n({},{name:"date",type:"text",autocomplete:"off"},e.inputAttr),!1)),e._v(" "),e.showClearIcon?t("i",{staticClass:"mx-icon-clear",on:{mousedown:function(t){return t.stopPropagation(),e.handleClear(t)}}},[e._t("icon-clear",[t("icon-close")])],2):e._e(),e._v(" "),t("i",{staticClass:"mx-icon-calendar"},[e._t("icon-calendar",[t("icon-calendar")])],2)]),e._v(" "),t("Popup",{ref:"popup",class:e.popupClass,style:e.popupStyle,attrs:{inline:e.inline,visible:e.popupVisible,"append-to-body":e.appendToBody},on:{clickoutside:e.handleClickOutSide}},[e.hasSlot("header")?t("div",{staticClass:"mx-datepicker-header"},[e._t("header",null,{value:e.currentValue,emit:e.emitValue})],2):e._e(),e._v(" "),t("div",{staticClass:"mx-datepicker-content-wrapper"},[e.hasSlot("sidebar")||e.shortcuts.length?t("div",{staticClass:"mx-datepicker-sidebar"},[e._t("sidebar",null,{value:e.currentValue,emit:e.emitValue}),e._v(" "),e._l(e.shortcuts,(function(n,a){return t("button",{key:a,staticClass:"mx-btn mx-btn-text mx-btn-shortcut",attrs:{type:"button"},on:{click:function(t){return e.handleSelectShortcut(n)}}},[e._v("\n "+e._s(n.text)+"\n ")])}))],2):e._e(),e._v(" "),t("div",{staticClass:"mx-datepicker-content"},[e._t("content",[t(e.currentComponent,e._b({ref:"picker",tag:"component",on:{select:e.handleSelectDate}},"component",e.currentComponentProps,!1))],{value:e.currentValue,emit:e.emitValue})],2)]),e._v(" "),e.hasSlot("footer")||e.confirm?t("div",{staticClass:"mx-datepicker-footer"},[e._t("footer",null,{value:e.currentValue,emit:e.emitValue}),e._v(" "),e.confirm?t("button",{staticClass:"mx-btn mx-datepicker-btn-confirm",attrs:{type:"button"},on:{click:e.handleConfirmDate}},[e._v("\n "+e._s(e.confirmText)+"\n ")]):e._e()],2):e._e()])],1)};Ke._withStripped=!0;var Ge=X({render:Ke,staticRenderFns:[]},void 0,Xe,void 0,!1,void 0,!1,void 0,void 0,void 0);return Ge.locale=z,Ge.install=function(e){e.component(Ge.name,Ge)},"undefined"!=typeof window&&window.Vue&&Ge.install(window.Vue),n(Ge,{CalendarPanel:ke,CalendarRange:_e,TimePanel:We,TimeRange:Le,DatetimePanel:ze,DatetimeRange:Je}),Ge})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DatePicker=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(r,!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e){return o(e)?new Date(e.getTime()):null==e?new Date(NaN):new Date(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>=0&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var n=s(e),a=(n.getDay()+7-t)%7;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,a=void 0===n?0:n,r=t.firstWeekContainsDate,i=void 0===r?1:r;if(!(i>=1&&i<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7");for(var o=s(e),u=o.getFullYear(),c=new Date(0),d=u+1;d>=u-1&&(c.setFullYear(d,0,i),c.setHours(0,0,0,0),c=l(c,a),!(o.getTime()>=c.getTime()));d--);return c}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,a=void 0===n?0:n,r=t.firstWeekContainsDate,i=void 0===r?1:r,o=s(e),c=l(o,a),d=u(o,{firstDayOfWeek:a,firstWeekContainsDate:i}),h=c.getTime()-d.getTime();return Math.round(h/6048e5)+1}var d={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},h=/\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;function f(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="".concat(Math.abs(e)),a=e<0?"-":"";n.length<t;)n="0".concat(n);return a+n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",a=Math.abs(e),r=a%60;return n+f(Math.floor(a/60),2)+t+f(r,2)}var m=function(e,t,n){var a=e<12?"AM":"PM";return n?a.toLocaleLowerCase():a},v={Y:function(e){var t=e.getFullYear();return t<=9999?"".concat(t):"+".concat(t)},YY:function(e){return f(e.getFullYear(),4).substr(2)},YYYY:function(e){return f(e.getFullYear(),4)},M:function(e){return e.getMonth()+1},MM:function(e){return f(e.getMonth()+1,2)},MMM:function(e,t){return t.monthsShort[e.getMonth()]},MMMM:function(e,t){return t.months[e.getMonth()]},D:function(e){return e.getDate()},DD:function(e){return f(e.getDate(),2)},H:function(e){return e.getHours()},HH:function(e){return f(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(){var e=v.h.apply(v,arguments);return f(e,2)},m:function(e){return e.getMinutes()},mm:function(e){return f(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return f(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return f(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return f(e.getMilliseconds(),3)},d:function(e){return e.getDay()},dd:function(e,t){return t.weekdaysMin[e.getDay()]},ddd:function(e,t){return t.weekdaysShort[e.getDay()]},dddd:function(e,t){return t.weekdays[e.getDay()]},A:function(e,t){return(t.meridiem||m)(e.getHours(),e.getMinutes(),!1)},a:function(e,t){return(t.meridiem||m)(e.getHours(),e.getMinutes(),!0)},Z:function(e){return p(e.getTimezoneOffset(),":")},ZZ:function(e){return p(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()},w:function(e,t){return c(e,{firstDayOfWeek:t.firstDayOfWeek,firstWeekContainsDate:t.firstWeekContainsDate})},ww:function(e,t){return f(v.w(e,t),2)}};function y(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",i=s(e);if(!o(n=i)||isNaN(n.getTime()))return"Invalid Date";var l=a.locale||d;return r.replace(h,(function(e,t){return t||("function"==typeof v[e]?"".concat(v[e](i,l)):e)}))}function g(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=/(\[[^\[]*\])|(MM?M?M?|Do|DD?|ddd?d?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|S{1,3}|x|X|ZZ?|.)/g,T=/\d/,k=/\d\d/,x=/\d\d?/,M=/[+-]?\d+/,_=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,O={},V=function(e,t,n){var a,r=Array.isArray(e)?e:[e];a="string"==typeof n?function(e){var t=parseInt(e,10);return C({},n,t)}:n,r.forEach((function(e){O[e]=[t,a]}))},Y=function(e,t){return function(n,a){var r=a[e];if(!Array.isArray(r))throw new Error("Locale[".concat(e,"] need an array"));var i=r.indexOf(n);if(i<0)throw new Error("Invalid Word");return C({},t,i)}};function F(){for(var e,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=n[0];return r<100&&r>=0?(n[0]+=400,e=new Date(Date.UTC.apply(Date,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(r)):e=new Date(Date.UTC.apply(Date,n)),e}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var a=n.locale,r=void 0===a?d:a,i=n.backupDate,o=void 0===i?new Date:i,s=function(e,t,n){var a=t.match(S);if(!a)throw new Error;for(var r=a.length,i={},o=0;o<r;o+=1){var s=a[o],l=O[s];if(l){var u="function"==typeof l[0]?l[0](n):l[0],c=l[1],d=(u.exec(e)||[])[0];i=w({},i,{},c(d,n)),e=e.replace(d,"")}else{var h=s.replace(/^\[|\]$/g,"");if(0!==e.indexOf(h))throw new Error("not match");e=e.substr(h.length)}}return i}(e,t,r),l=s.year,c=s.month,h=s.day,f=s.date,p=s.offset,m=s.weekday,v=s.week;if(f)return f;var y=[l,c,h,s.hour,s.minute,s.second,s.millisecond];if(y[3]=function(e,t){if(void 0!==e&&void 0!==t)if(t){if(e<12)return e+12}else if(12===e)return 0;return e}(y[3],s.isPM),void 0!==v&&void 0===c&&void 0===h){var b=u(void 0===l?o:new Date(l,3),{firstDayOfWeek:r.firstDayOfWeek,firstWeekContainsDate:r.firstWeekContainsDate});return new Date(b.getTime()+7*(v-1)*24*3600*1e3)}var D=F.apply(void 0,g(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=[0,0,1,0,0,0,0],a=[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],r=!0,i=0;i<7;i++)void 0===e[i]?n[i]=r?a[i]:n[i]:(n[i]=e[i],r=!1);return n}(y,o))),C=60*(void 0===p?D.getTimezoneOffset():p)*1e3,T=new Date(D.getTime()+C);return void 0!==m&&T.getDay()!==m?new Date(NaN):T}catch(e){return new Date(NaN)}}function A(e){var t=new Date(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:0);return e<100&&e>=0&&t.setFullYear(e),t}function N(e){return e instanceof Date&&!isNaN(e)}function H(e){return Array.isArray(e)&&2===e.length&&e.every(N)&&e[0]<=e[1]}function I(e){for(var t=new Date(e),n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return N(t)?t:I.apply(void 0,a)}function $(e,t){if(!Array.isArray(e))return[];var n=[],a=e.length,r=0;for(t=t||a;r<a;)n.push(e.slice(r,r+=t));return n}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function j(e,t){if(!E(e))return{};Array.isArray(t)||(t=[t]);var n={};return t.forEach((function(t){t in e&&(n[t]=e[t])})),n}V("Y",M,"year"),V("YY",k,(function(e){var t=(new Date).getFullYear(),n=Math.floor(t/100),a=parseInt(e,10);return C({},"year",a=100*(a>68?n-1:n)+a)})),V("YYYY",/\d{4}/,"year"),V("M",x,(function(e){return C({},"month",parseInt(e,10)-1)})),V("MM",k,(function(e){return C({},"month",parseInt(e,10)-1)})),V("MMM",_,Y("monthsShort","month")),V("MMMM",_,Y("months","month")),V("D",x,"day"),V("DD",k,"day"),V(["H","h"],x,"hour"),V(["HH","hh"],k,"hour"),V("m",x,"minute"),V("mm",k,"minute"),V("s",x,"second"),V("ss",k,"second"),V("S",T,(function(e){return C({},"millisecond",100*parseInt(e,10))})),V("SS",k,(function(e){return C({},"millisecond",10*parseInt(e,10))})),V("SSS",/\d{3}/,"millisecond"),V(["A","a"],(function(e){return e.meridiemParse||/[ap]\.?m?\.?/i}),(function(e,t){return{isPM:"function"==typeof t.isPM?t.isPM(e):function(e){return"p"==="".concat(e).toLowerCase().charAt(0)}(e)}})),V(["Z","ZZ"],/[+-]\d\d:?\d\d/,(function(e){return{offset:(t=e,n=D(t.match(/([+-]|\d\d)/g)||["-","0","0"],3),a=n[0],r=n[2],i=60*parseInt(n[1],10)+parseInt(r,10),0===i?0:"+"===a?-i:+i)};var t,n,a,r,i})),V("x",M,(function(e){return{date:new Date(parseInt(e,10))}})),V("X",/[+-]?\d+(\.\d{1,3})?/,(function(e){return{date:new Date(1e3*parseFloat(e))}})),V("d",T,"weekday"),V("dd",_,Y("weekdaysMin","weekday")),V("ddd",_,Y("weekdaysShort","weekday")),V("dddd",_,Y("weekdays","weekday")),V("w",x,"week"),V("ww",k,"week");var W,L=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},e.exports=t.default})),B=(W=L)&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W,R="en",q={};function z(e,t,n){if("string"!=typeof e)return q[R];var a=R;return q[e]&&(a=e),t&&(q[e]=t,a=e),n||(R=a),q[e]||q[R]}function J(e){return z(e,null,!0)}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e&&e!==t?e.scrollHeight>e.clientHeight?e:U(e.parentNode,t):null}q[R]={formatLocale:B,yearFormat:"YYYY",monthFormat:"MMM",monthBeforeYear:!0};var Z={name:"Popup",props:{visible:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0},inline:{type:Boolean,default:!1}},data:function(){return{top:"",left:""}},watch:{visible:{immediate:!0,handler:function(e){var t=this;this.$nextTick((function(){e&&t.displayPopup()}))}}},mounted:function(){var e=this;if(!this.inline){this.appendToBody&&document.body.appendChild(this.$el),this._clickoutEvent="ontouchend"in document?"touchstart":"mousedown",document.addEventListener(this._clickoutEvent,this.handleClickOutside);var t,n,a=this.$parent.$el;this._displayPopup=(t=function(){return e.displayPopup()},n=!1,function(){for(var e=this,a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];n||(n=!0,requestAnimationFrame((function(){n=!1,t.apply(e,r)})))}),this._scrollParent=U(a)||window,this._scrollParent.addEventListener("scroll",this._displayPopup),window.addEventListener("resize",this._displayPopup)}},beforeDestroy:function(){this.inline||(this.appendToBody&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),document.removeEventListener(this._clickoutEvent,this.handleClickOutside),this._scrollParent.removeEventListener("scroll",this._displayPopup),window.removeEventListener("resize",this._displayPopup))},methods:{handleClickOutside:function(e){if(this.visible){var t=this.$el;t&&!t.contains(e.target)&&this.$emit("clickoutside",e)}},displayPopup:function(){if(!this.inline&&this.visible){var e=this.$parent.$el,t=this.appendToBody;this._popupRect||(this._popupRect=function(e){var t=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";var a=window.getComputedStyle(e),r=e.offsetWidth+parseInt(a.marginLeft,10)+parseInt(a.marginRight,10),i=e.offsetHeight+parseInt(a.marginTop,10)+parseInt(a.marginBottom,10);return e.style.display=t,e.style.visibility=n,{width:r,height:i}}(this.$el));var n=this._popupRect,a=function(e,t,n,a){var r=0,i=0,o=0,s=e.getBoundingClientRect(),l=document.documentElement.clientWidth,u=document.documentElement.clientHeight;return a&&(i=window.pageXOffset+s.left,o=window.pageYOffset+s.top),r=s.top<=n&&u-s.bottom<=n?o+u-s.top-n:s.top+s.height/2<=u/2?o+s.height:o-n,{left:"".concat(l-s.left<t&&s.right<t?i-s.left+1:s.left+s.width/2<=l/2?i:i+s.width-t,"px"),top:"".concat(r,"px")}}(e,n.width,n.height,t),r=a.top;this.left=a.left,this.top=r}}},render:function(){var e=arguments[0];return this.inline?e("div",{class:"mx-datepicker-main"},[this.$slots.default]):e("transition",{attrs:{name:"mx-zoom-in-down"}},[this.visible&&e("div",{class:"mx-datepicker-main mx-datepicker-popup",style:{top:this.top,left:this.left}},[this.$slots.default])])}};function X(e,t,n,a,r,i,o,s,l,u){"boolean"!=typeof o&&(l=s,s=o,o=!1);var c,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),a&&(d._scopeId=a),i?d._ssrRegister=c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)}:t&&(c=o?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return n}"undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());var K=X({render:function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M940.218182 107.054545h-209.454546V46.545455h-65.163636v60.50909H363.054545V46.545455H297.890909v60.50909H83.781818c-18.618182 0-32.581818 13.963636-32.581818 32.581819v805.236363c0 18.618182 13.963636 32.581818 32.581818 32.581818h861.090909c18.618182 0 32.581818-13.963636 32.581818-32.581818V139.636364c-4.654545-18.618182-18.618182-32.581818-37.236363-32.581819zM297.890909 172.218182V232.727273h65.163636V172.218182h307.2V232.727273h65.163637V172.218182h176.872727v204.8H116.363636V172.218182h181.527273zM116.363636 912.290909V442.181818h795.927273v470.109091H116.363636z"}})])},staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),G=X({render:function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M810.005333 274.005333l-237.994667 237.994667 237.994667 237.994667-60.010667 60.010667-237.994667-237.994667-237.994667 237.994667-60.010667-60.010667 237.994667-237.994667-237.994667-237.994667 60.010667-60.010667 237.994667 237.994667 237.994667-237.994667z"}})])},staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0);function Q(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object.prototype.toString.call(t);return t instanceof Date||"object"===e(t)&&"[object Date]"===n?new Date(t.getTime()):"number"==typeof t||"[object Number]"===n?new Date(t):("string"!=typeof t&&"[object String]"!==n||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function ee(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function te(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Q(e);return t.setHours(0,0,0,0),t}function ne(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Q(e),n=t.getFullYear(),a=t.getMonth(),r=new Date(0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function ae(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Q(e),a=ee(t),r=n.getMonth()+a,i=new Date(0);i.setFullYear(n.getFullYear(),r,1),i.setHours(0,0,0,0);var o=ne(i);return n.setMonth(r,Math.min(o,n.getDate())),n}function re(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ae(e,12*ee(t))}function ie(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Q(e);return t.setDate(1),t.setHours(0,0,0,0),t}function oe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Q(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function se(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Q(e),a=ee(t),r=n.getFullYear(),i=n.getDate(),o=new Date(0);o.setFullYear(r,a,15),o.setHours(0,0,0,0);var s=ne(o);return n.setMonth(a,Math.min(i,s)),n}function le(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Q(e),a=ee(t);return isNaN(n)?new Date(NaN):(n.setFullYear(a),n)}function ue(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ae(e,-ee(t))}var ce,de={inject:{locale:{default:J()}},methods:{t:function(e){for(var t,n=e.split("."),a=this.locale||J(),r=0,i=n.length;r<i;r++){if(t=a[n[r]],r===i-1)return t;if(!t)return null;a=t}return null}}},he={mixins:[de],methods:{formatDate:function(e,t){return y(e,t,{locale:this.t("formatLocale")})}}},fe=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{staticClass:"mx-table mx-table-date"},[t("thead",[t("tr",[e.showWeekNumber?t("th",{staticClass:"mx-week-number-header"}):e._e(),e._v(" "),e._l(e.days,(function(n){return t("th",{key:n},[e._v(e._s(n))])}))],2)]),e._v(" "),t("tbody",{on:{click:e.handleCellClick}},e._l(e.dates,(function(n,a){return t("tr",{key:a,staticClass:"mx-date-row",class:e.getRowClasses(n)},[e.showWeekNumber?t("td",{staticClass:"mx-week-number"},[e._v("\n "+e._s(e.getWeekNumber(n[0].day))+"\n ")]):e._e(),e._v(" "),e._l(n,(function(n,a){return t("td",{key:a,staticClass:"cell",class:e.getCellClasses(n.day),attrs:{"data-day":n.day,title:e.getCellTitle(n.day)}},[t("div",[e._v(e._s(n.text))])])}))],2)})),0)])},staticRenderFns:[]},void 0,{name:"TableDate",mixins:[de,he],props:{calendarYear:{type:Number,default:function(){return(new Date).getFullYear()}},calendarMonth:{type:Number,default:function(){return(new Date).getMonth()}},showWeekNumber:{type:Boolean,default:!1},titleFormat:{type:String,default:"YYYY-MM-DD"},getRowClasses:{type:Function,default:function(){return[]}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{firstDayOfWeek:function(){return this.t("formatLocale.firstDayOfWeek")||0},days:function(){var e=this.t("days")||this.t("formatLocale.weekdaysMin");return e.concat(e).slice(this.firstDayOfWeek,this.firstDayOfWeek+7)},dates:function(){for(var e=[],t=this.firstDayOfWeek,n=this.calendarMonth,a=A(this.calendarYear,n,0),r=a.getDate(),i=r-(a.getDay()+7-t)%7,o=i;o<=r;o++){e.push({day:o-r,text:o})}a.setMonth(n+1,0);for(var s=a.getDate(),l=1;l<=s;l++)e.push({day:l,text:l});for(var u=42-(r-i+1)-s,c=1;c<=u;c++)e.push({day:s+c,text:c});return $(e,7)}},methods:{handleCellClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-day");n&&this.$emit("select",parseInt(n,10))},getCellTitle:function(e){var t=this.titleFormat,n=A(this.calendarYear,this.calendarMonth,e);return this.formatDate(n,t)},getWeekNumber:function(e){return c(A(this.calendarYear,this.calendarMonth,e),this.t("formatLocale"))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),pe=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{staticClass:"mx-table mx-table-month",on:{click:e.handleClick}},e._l(e.months,(function(n,a){return t("tr",{key:a},e._l(n,(function(n,a){return t("td",{key:a,staticClass:"cell",class:e.getCellClasses(n.month),attrs:{"data-month":n.month}},[t("div",[e._v(e._s(n.text))])])})),0)})),0)},staticRenderFns:[]},void 0,{name:"TableMonth",mixins:[de],props:{getCellClasses:{type:Function,default:function(){return[]}}},computed:{months:function(){var e=(this.t("months")||this.t("formatLocale.monthsShort")).map((function(e,t){return{text:e,month:t}}));return $(e,3)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-month");n&&this.$emit("select",parseInt(n,10))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),me=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{staticClass:"mx-table mx-table-year",on:{click:e.handleClick}},e._l(e.years,(function(n,a){return t("tr",{key:a},e._l(n,(function(n,a){return t("td",{key:a,staticClass:"cell",class:e.getCellClasses(n),attrs:{"data-year":n}},[t("div",[e._v(e._s(n))])])})),0)})),0)},staticRenderFns:[]},void 0,{name:"TableYear",props:{decade:Number,getCellClasses:{type:Function,default:function(){return[]}}},computed:{years:function(){for(var e=this.decade,t=[],n=0;n<10;n++)t.push(e+n);return $(t,2)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-year");n&&this.$emit("select",parseInt(n,10))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ve=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:["mx-calendar","mx-calendar-panel-"+e.panel,{"mx-calendar-week-mode":"week"===e.type}]},[t("div",{staticClass:"mx-calendar-header"},[t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconDoubleArrow,expression:"showIconDoubleArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-double-left",on:{click:e.handleIconDoubleLeftClick}},[t("i",{staticClass:"mx-icon-double-left"})]),e._v(" "),t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconArrow,expression:"showIconArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-left",on:{click:e.handleIconLeftClick}},[t("i",{staticClass:"mx-icon-left"})]),e._v(" "),t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconDoubleArrow,expression:"showIconDoubleArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-double-right",on:{click:e.handleIconDoubleRightClick}},[t("i",{staticClass:"mx-icon-double-right"})]),e._v(" "),t("button",{directives:[{name:"show",rawName:"v-show",value:e.showIconArrow,expression:"showIconArrow"}],staticClass:"mx-btn mx-btn-text mx-btn-icon-right",on:{click:e.handleIconRightClick}},[t("i",{staticClass:"mx-icon-right"})]),e._v(" "),t("span",{staticClass:"mx-calendar-header-label"},["year"===e.panel?[t("span",[e._v(e._s(e.calendarDecade))]),e._v(" "),t("span",{staticClass:"mx-calendar-decade-separator"}),e._v(" "),t("span",[e._v(e._s(e.calendarDecade+9))])]:"month"===e.panel?t("button",{staticClass:"mx-btn mx-btn-text",on:{click:function(t){return e.handelPanelChange("year")}}},[e._v("\n "+e._s(e.calendarYear)+"\n ")]):"date"===e.panel?e._l(e.dateHeader,(function(n){return t("button",{key:n.panel,class:"mx-btn mx-btn-text mx-btn-current-"+n.panel,on:{click:function(t){return e.handelPanelChange(n.panel)}}},[e._v("\n "+e._s(n.label)+"\n ")])})):e._e()],2)]),e._v(" "),t("div",{staticClass:"mx-calendar-content"},[t("table-year",{directives:[{name:"show",rawName:"v-show",value:"year"===e.panel,expression:"panel === 'year'"}],attrs:{decade:e.calendarDecade,"get-cell-classes":e.getYearClasses},on:{select:e.handleSelectYear}}),e._v(" "),"year"!==e.type?t("table-month",{directives:[{name:"show",rawName:"v-show",value:"month"===e.panel,expression:"panel === 'month'"}],attrs:{"get-cell-classes":e.getMonthClasses},on:{select:e.handleSelectMonth}}):e._e(),e._v(" "),"year"!==e.type&&"month"!==e.type?t("table-date",{directives:[{name:"show",rawName:"v-show",value:"date"===e.panel,expression:"panel === 'date'"}],attrs:{"calendar-year":e.calendarYear,"calendar-month":e.calendarMonth,"title-format":e.titleFormat,"show-week-number":"boolean"==typeof e.showWeekNumber?e.showWeekNumber:"week"===e.type,"get-cell-classes":e.getDateClasses,"get-row-classes":e.getWeekState},on:{select:e.handleSelectDate}}):e._e()],1)])},staticRenderFns:[]},void 0,{name:"CalendarPanel",components:{TableDate:fe,TableMonth:pe,TableYear:me},mixins:[de,he],props:{value:{},defaultValue:{type:[Date,Number],default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},disabledDate:{type:Function,default:function(){return!1}},type:{type:String,default:"date"},getClasses:{type:Function,default:function(){return[]}},showWeekNumber:{type:Boolean,default:void 0},titleFormat:{type:String,default:"YYYY-MM-DD"},calendar:Date,partialUpdate:{type:Boolean,default:!1}},data:function(){return{panel:-1!==["date","year","month"].indexOf(this.type)?this.type:"date",innerCalendar:null}},computed:{innerValue:function(){var e=Array.isArray(this.value)?this.value:[this.value],t={year:oe,month:ie,date:te},n=t[this.type]||t.date;return e.filter(N).map((function(e){return n(e)}))},calendarYear:function(){return this.innerCalendar.getFullYear()},calendarMonth:function(){return this.innerCalendar.getMonth()},calendarDecade:function(){return 10*Math.floor(this.calendarYear/10)},showIconDoubleArrow:function(){return"date"===this.panel||"month"===this.panel||"year"===this.panel},showIconArrow:function(){return"date"===this.panel},dateHeader:function(){var e=this.t("monthBeforeYear"),t=this.t("yearFormat"),n=this.t("monthFormat")||"MMM",a={panel:"year",label:this.formatDate(this.innerCalendar,t)},r={panel:"month",label:this.formatDate(this.innerCalendar,n)};return e?[r,a]:[a,r]}},watch:{value:{immediate:!0,handler:"initCalendar"},calendar:{handler:"initCalendar"},defaultValue:{handler:"initCalendar"}},methods:{initCalendar:function(){var e=this.calendar;N(e)||(e=I(this.innerValue[0],this.defaultValue)),this.innerCalendar=e},emitDate:function(e,t){this.disabledDate(new Date(e))||this.$emit("select",e,t)},updateCalendar:function(e){this.innerCalendar=e,this.$emit("update:calendar",e)},handelPanelChange:function(e){this.panel=e},handleIconLeftClick:function(){var e=ue(this.innerCalendar,1);this.updateCalendar(e)},handleIconRightClick:function(){var e=ae(this.innerCalendar,1);this.updateCalendar(e)},handleIconDoubleLeftClick:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return re(e,-ee(t))}(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e)},handleIconDoubleRightClick:function(){var e=re(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e)},handleSelectYear:function(e){if("year"===this.type){var t=this.getCellDate(e,"year");this.emitDate(t,"year")}else{var n=le(this.innerCalendar,e);if(this.updateCalendar(n),this.handelPanelChange("month"),this.partialUpdate&&this.innerValue[0]){var a=le(this.innerValue[0],e);this.emitDate(a,"year")}}},handleSelectMonth:function(e){if("month"===this.type){var t=this.getCellDate(e,"month");this.emitDate(t,"month")}else{var n=se(this.innerCalendar,e);if(this.updateCalendar(n),this.handelPanelChange("date"),this.partialUpdate&&this.innerValue[0]){var a=se(le(this.innerValue[0],this.calendarYear),e);this.emitDate(a,"month")}}},handleSelectDate:function(e){var t=this.getCellDate(e,"date");this.emitDate(t,"week"===this.type?"week":"date")},getCellDate:function(e,t){return"year"===t?A(e,0):"month"===t?A(this.calendarYear,e):A(this.calendarYear,this.calendarMonth,e)},getDateClasses:function(e){var t=this.getCellDate(e,"date"),n=t.getMonth()!==this.calendarMonth,a=[];t.getTime()===(new Date).setHours(0,0,0,0)&&a.push("today"),n&&a.push("not-current-month");var r=this.getStateClass(t);return"active"===r&&n||a.push(r),a.concat(this.getClasses(t,this.innerValue,a.join(" ")))},getMonthClasses:function(e){if("month"!==this.type)return this.calendarMonth===e?"active":"";var t=[],n=this.getCellDate(e,"month");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getYearClasses:function(e){if("year"!==this.type)return this.calendarYear===e?"active":"";var t=[],n=this.getCellDate(e,"year");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getStateClass:function(e){return this.disabledDate(new Date(e))?"disabled":this.innerValue.some((function(t){return t.getTime()===e.getTime()}))?"active":""},getWeekState:function(e){if("week"!==this.type)return"";var t=this.getCellDate(e[0].day,"date").getTime(),n=this.getCellDate(e[6].day,"date").getTime();return this.innerValue.some((function(e){var a=e.getTime();return a>=t&&a<=n}))?"mx-active-week":""}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ye={name:"CalendarRange",components:{CalendarPanel:ve},props:r({},ve.props),data:function(){return{innerValue:[],calendars:[]}},computed:{calendarMinDiff:function(){var e={date:1,month:12,year:120};return e[this.type]||e.date},calendarMaxDiff:function(){return Infinity}},watch:{value:{immediate:!0,handler:function(){var e=this;this.innerValue=H(this.value)?this.value:[new Date(NaN),new Date(NaN)],this.calendars=this.innerValue.map((function(t){return I(t,e.defaultValue)})),this.validateCalendars(1)}}},methods:{handleSelect:function(e,t){var n=i(this.innerValue,2),a=n[0],r=n[1];N(a)&&!N(r)?(this.innerValue=a.getTime()>e.getTime()?[e,a]:[a,e],this.emitDate(this.innerValue,t)):this.innerValue=[e,new Date(NaN)]},emitDate:function(e,t){this.$emit("select",e,t)},updateStartCalendar:function(e){this.calendars.splice(0,1,e),this.validateCalendars(1)},updateEndCalendar:function(e){this.calendars.splice(1,1,e),this.validateCalendars(0)},validateCalendars:function(e){var t=this.getCalendarGap();if(t){var n=this.calendars[e];n=0===e?ue(n,t):ae(n,t),this.calendars.splice(e,1,n)}},getCalendarGap:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Q(e),a=Q(t);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}(this.calendars[1],this.calendars[0]),t=this.calendarMinDiff,n=this.calendarMaxDiff;return e<t?t-e:e>n?n-e:0},getRangeClasses:function(e,t,n){return!/disabled|active|not-current-month/.test(n)&&2===t.length&&e.getTime()>t[0].getTime()&&e.getTime()<t[1].getTime()?"in-range":""}},render:function(){var e=this,t=arguments[0],n=this.calendars.map((function(n,a){var i=r({},e.$props,{calendar:n,value:e.innerValue,getClasses:e.getRangeClasses,partialUpdate:!1}),o={select:e.handleSelect,"update:calendar":0===a?e.updateStartCalendar:e.updateEndCalendar};return t("calendar-panel",{props:r({},i),on:r({},o)})}));return t("div",{class:"mx-range-wrapper"},[n])}};var ge=X({render:function(){var e=this._self._c||this.$createElement;return e("div",{staticClass:"mx-scrollbar",style:{position:"relative",overflow:"hidden"}},[e("div",{ref:"wrap",staticClass:"mx-scrollbar-wrap",style:{marginRight:"-"+this.scrollbarWidth+"px"},on:{scroll:this.handleScroll}},[this._t("default")],2),this._v(" "),e("div",{staticClass:"mx-scrollbar-track"},[e("div",{ref:"thumb",staticClass:"mx-scrollbar-thumb",style:{height:this.thumbHeight,top:this.thumbTop},on:{mousedown:this.handleDragstart}})])])},staticRenderFns:[]},void 0,{data:function(){return{scrollbarWidth:0,thumbTop:"",thumbHeight:""}},created:function(){this.scrollbarWidth=function(){if("undefined"==typeof window)return 0;if(void 0!==ce)return ce;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=document.createElement("div");return t.style.width="100%",e.appendChild(t),ce=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),ce}(),document.addEventListener("mouseup",this.handleDragend)},beforeDestroy:function(){document.addEventListener("mouseup",this.handleDragend)},mounted:function(){this.$nextTick(this.getThumbSize)},methods:{getThumbSize:function(){var e=this.$refs.wrap;if(e){var t=100*e.clientHeight/e.scrollHeight;this.thumbHeight=t<100?"".concat(t,"%"):""}},handleScroll:function(e){var t=e.currentTarget;this.thumbTop="".concat(100*t.scrollTop/t.scrollHeight,"%")},handleDragstart:function(e){e.stopImmediatePropagation(),this._draggable=!0,this._prevY=e.clientY-this.$refs.thumb.offsetTop,document.addEventListener("mousemove",this.handleDraging)},handleDraging:function(e){if(this._draggable){var t=this.$refs.wrap;t.scrollTop=(e.clientY-this._prevY)*t.scrollHeight/t.clientHeight}},handleDragend:function(){this._draggable&&(this._draggable=!1,document.removeEventListener("mousemove",this.handleDraging))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),be=function(e){return(e=parseInt(e,10))<10?"0".concat(e):"".concat(e)},we=function(e,t,n){if(Array.isArray(n))return n.filter((function(t){return t>=0&&t<e}));t<=0&&(t=1);for(var a=[],r=0;r<e;r+=t)a.push(r);return a},De=function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(a<=0)requestAnimationFrame((function(){t.scrollTop=n}));else{var r=n-t.scrollTop,i=r/a*10;requestAnimationFrame((function(){var r=t.scrollTop+i;r>=n?t.scrollTop=n:(t.scrollTop=r,e(t,n,a-10))}))}},Ce=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{staticClass:"mx-time-columns"},e._l(e.columns,(function(n,a){return t("scrollbar-vertical",{key:a,staticClass:"mx-time-column"},[t("ul",{staticClass:"mx-time-list",attrs:{"data-type":n.type,"data-index":a},on:{click:e.handleSelect}},e._l(n.list,(function(n,a){return t("li",{key:n.value,staticClass:"mx-time-item",class:e.getClasses(n.value),attrs:{"data-index":a}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)])})),1)},staticRenderFns:[]},void 0,{name:"ListColumns",components:{ScrollbarVertical:ge},props:{date:Date,getClasses:{type:Function,default:function(){return[]}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},use12h:{type:Boolean,default:!1}},computed:{columns:function(){var e=[];return this.showHour&&e.push({type:"hour",list:this.getHoursList()}),this.showMinute&&e.push({type:"minute",list:this.getMinutesList()}),this.showSecond&&e.push({type:"second",list:this.getSecondsList()}),this.use12h&&e.push({type:"ampm",list:this.getAMPMList()}),e.filter((function(e){return e.list.length>0}))}},watch:{date:{handler:function(){var e=this;this.$nextTick((function(){e.scrollToSelected(100)}))}}},mounted:function(){this.scrollToSelected(0)},methods:{getHoursList:function(){var e=this;return we(this.use12h?12:24,this.hourStep,this.hourOptions).map((function(t){var n=new Date(e.date),a=be(t);return e.use12h&&(0===t&&(a="12"),n.getHours()>=12&&(t+=12)),{value:n.setHours(t),text:a}}))},getMinutesList:function(){var e=this;return we(60,this.minuteStep,this.minuteOptions).map((function(t){return{value:new Date(e.date).setMinutes(t),text:be(t)}}))},getSecondsList:function(){var e=this;return we(60,this.secondStep,this.secondOptions).map((function(t){return{value:new Date(e.date).setSeconds(t),text:be(t)}}))},getAMPMList:function(){var e=this;return["AM","PM"].map((function(t,n){var a=new Date(e.date);return{text:t,value:a.setHours(a.getHours()%12+12*n)}}))},scrollToSelected:function(e){for(var t=this.$el.querySelectorAll(".active"),n=0;n<t.length;n++){var a=t[n],r=U(a,this.$el);if(r)De(r,a.offsetTop,e)}},handleSelect:function(e){var t=e.target,n=e.currentTarget;if("LI"===t.tagName.toUpperCase()){var a=n.getAttribute("data-type"),r=parseInt(n.getAttribute("data-index"),10),i=parseInt(t.getAttribute("data-index"),10);this.$emit("select",this.columns[r].list[i].value,a)}}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function Se(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(":");return e.length>=2?{hours:parseInt(e[0],10),minutes:parseInt(e[1],10)}:null}var Te=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("scrollbar-vertical",e._l(e.list,(function(n){return t("div",{key:n.value,staticClass:"mx-time-option",class:e.getClasses(n.value),on:{click:function(t){return e.handleSelect(n.value)}}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)},staticRenderFns:[]},void 0,{name:"ListOptions",components:{ScrollbarVertical:ge},mixins:[de,he],props:{date:Date,options:{type:[Object,Function],default:function(){return[]}},format:{type:String,default:"HH:mm:ss"},getClasses:{type:Function,default:function(){return[]}}},computed:{list:function(){var e=[],t=this.options;if("function"==typeof t)return t()||[];var n=Se(t.start),a=Se(t.end),r=Se(t.step),i=t.format||this.format;if(n&&a&&r)for(var o=n.minutes+60*n.hours,s=r.minutes+60*r.hours,l=Math.floor((a.minutes+60*a.hours-o)/s),u=0;u<=l;u++){var c=o+u*s,d=Math.floor(c/60),h=c%60,f=new Date(this.date).setHours(d,h,0);e.push({value:f,text:this.formatDate(f,i)})}return e}},mounted:function(){this.scrollToSelected()},methods:{scrollToSelected:function(){var e=this.$el.querySelector(".active");if(e){var t=U(e,this.$el);if(t)!function(e,t){e&&(e.scrollTop=t)}(t,e.offsetTop)}},handleSelect:function(e){this.$emit("select",e,"time")}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ke=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{staticClass:"mx-time"},[e.showTimeHeader?t("div",{staticClass:"mx-time-header"},[t("button",{staticClass:"mx-btn mx-btn-text mx-time-header-title",on:{click:e.handleClickTitle}},[e._v("\n "+e._s(e.title)+"\n ")])]):e._e(),e._v(" "),t("div",{staticClass:"mx-time-content"},[e.timePickerOptions?t("list-options",{attrs:{date:e.innerValue,"get-classes":e.getClasses,options:e.timePickerOptions,format:e.format},on:{select:e.handleSelect}}):t("list-columns",e._b({attrs:{date:e.innerValue,"get-classes":e.getClasses,"hour-options":e.hourOptions,"minute-options":e.minuteOptions,"second-options":e.secondOptions,"hour-step":e.hourStep,"minute-step":e.minuteStep,"second-step":e.secondStep},on:{select:e.handleSelect}},"list-columns",e.ShowHourMinuteSecondAMPM,!1))],1)])},staticRenderFns:[]},void 0,{name:"TimePanel",components:{ListColumns:Ce,ListOptions:Te},mixins:[de,he],props:{value:{},defaultValue:{type:[Date,Number],default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},format:{type:String,default:"HH:mm:ss"},timeTitleFormat:{type:String,default:"YYYY-MM-DD"},showTimeHeader:{type:Boolean,default:!1},disabledTime:{type:Function,default:function(){return!1}},timePickerOptions:{type:[Object,Function],default:function(){return null}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12h:{type:Boolean,default:void 0}},computed:{innerValue:function(){return I(this.value,this.defaultValue)},title:function(){var e=this.timeTitleFormat,t=new Date(this.innerValue);return this.formatDate(t,e)},ShowHourMinuteSecondAMPM:function(){var e=this,t=this.format,n={showHour:/[HhKk]/.test(t),showMinute:/m/.test(t),showSecond:/s/.test(t),use12h:/a/i.test(t)},a={};return Object.keys(n).forEach((function(t){a[t]="boolean"==typeof e[t]?e[t]:n[t]})),a}},methods:{handleSelect:function(e,t){var n=new Date(e);this.disabledTime(new Date(e))||this.$emit("select",n,t)},handleClickTitle:function(){this.$emit("title-click")},getClasses:function(e){var t=new Date(e);return this.disabledTime(new Date(e))?"disabled":t.getTime()===this.innerValue.getTime()?"active":""}}},void 0,!1,void 0,!1,void 0,void 0,void 0),xe={name:"TimeRange",props:r({},ke.props),data:function(){return{startValue:new Date(NaN),endValue:new Date(NaN)}},watch:{value:{immediate:!0,handler:function(){if(H(this.value)){var e=i(this.value,2),t=e[1];this.startValue=e[0],this.endValue=t}else this.startValue=new Date(NaN),this.endValue=new Date(NaN)}}},methods:{emitChange:function(e,t){this.$emit("select",[this.startValue,this.endValue],e,t)},handleSelectStart:function(e,t){this.startValue=e,this.endValue.getTime()>=e.getTime()||(this.endValue=e),this.emitChange(t,0)},handleSelectEnd:function(e,t){this.endValue=e,this.startValue.getTime()<=e.getTime()||(this.startValue=e),this.emitChange(t,1)},disabledStartTime:function(e){return this.disabledTime(e,0)},disabledEndTime:function(e){return e.getTime()<this.startValue.getTime()||this.disabledTime(e,1)}},render:function(){var e=arguments[0];return e("div",{class:"mx-range-wrapper"},[e(ke,{props:r({},r({},this.$props,{value:this.startValue,disabledTime:this.disabledStartTime})),on:r({},r({},this.$listeners,{select:this.handleSelectStart}))}),e(ke,{props:r({},r({},this.$props,{value:this.endValue,disabledTime:this.disabledEndTime})),on:r({},r({},this.$listeners,{select:this.handleSelectEnd}))})])}};function Me(){return(Me=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)}var _e=["attrs","props","domProps"],Oe=["class","style","directives"],Ve=["on","nativeOn"],Ye=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Fe=function(e){return e.reduce((function(e,t){for(var n in t)if(e[n])if(-1!==_e.indexOf(n))e[n]=Me({},e[n],t[n]);else if(-1!==Oe.indexOf(n)){var a=e[n]instanceof Array?e[n]:[e[n]],r=t[n]instanceof Array?t[n]:[t[n]];e[n]=a.concat(r)}else if(-1!==Ve.indexOf(n))for(var i in t[n])if(e[n][i]){var o=e[n][i]instanceof Array?e[n][i]:[e[n][i]],s=t[n][i]instanceof Array?t[n][i]:[t[n][i]];e[n][i]=o.concat(s)}else e[n][i]=t[n][i];else if("hook"==n)for(var l in t[n])e[n][l]=e[n][l]?Ye(e[n][l],t[n][l]):t[n][l];else e[n]=t[n];else e[n]=t[n];return e}),{})},Pe={name:"DatetimePanel",props:r({},ve.props,{},ke.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){"date"===t&&this.openTimePanel();var n=N(this.value)?this.value:new Date(this.defaultValue),a=new Date(e);a.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),this.disabledTime(new Date(a))?this.currentValue=e:this.emitDate(a,t)}},render:function(){var e=arguments[0],t={props:r({},j(this,Object.keys(ve.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:r({},j(this,Object.keys(ke.props)),{showTimeHeader:!0,value:this.currentValue}),on:{select:this.emitDate,"title-click":this.closeTimePanel}};return e("div",[e(ve,Fe([{},t])),this.timeVisible&&e(ke,Fe([{class:"mx-calendar-time"},n]))])}},Ae={name:"DatetimeRange",props:r({},ye.props,{},xe.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){var n=this;"date"===t&&this.openTimePanel();var a=e.map((function(e,t){var a=new Date(e),r=H(n.value)?n.value[t]:new Date(n.defaultValue);return a.setHours(r.getHours(),r.getMinutes(),r.getSeconds()),a}));a[1].getTime()<a[0].getTime()&&(a=[a[0],a[0]]),a.some(this.disabledTime)?this.currentValue=e:this.emitDate(a,t)}},render:function(){var e=arguments[0],t={props:r({},j(this,Object.keys(ye.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:r({},j(this,Object.keys(xe.props)),{value:this.currentValue,showTimeHeader:!0}),on:{select:this.emitDate,"title-click":this.closeTimePanel}};return e("div",[e(ye,Fe([{},t])),this.timeVisible&&e(xe,Fe([{class:"mx-calendar-time"},n]))])}},Ne={default:ve,time:ke,datetime:Pe},He={default:ye,time:xe,datetime:Ae},Ie=X({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:{"mx-datepicker":!0,"mx-datepicker-range":e.range,"mx-datepicker-inline":e.inline,disabled:e.disabled}},[e.inline?e._e():t("div",{staticClass:"mx-input-wrapper",on:{mousedown:e.openPopup,touchstart:e.openPopup}},[e._t("input",[t("input",e._b({ref:"input",class:e.inputClass,attrs:{disabled:e.disabled,readonly:!e.editable,placeholder:e.placeholder},on:{keydown:e.handleInputKeydown,focus:e.handleInputFocus,blur:e.handleInputBlur,input:e.handleInputInput,change:e.handleInputChange}},"input",n({},{name:"date",type:"text",autocomplete:"off",value:e.text},e.inputAttr),!1))]),e._v(" "),e.showClearIcon?t("i",{staticClass:"mx-icon-clear",on:{mousedown:function(t){return t.stopPropagation(),e.handleClear(t)}}},[e._t("icon-clear",[t("icon-close")])],2):e._e(),e._v(" "),t("i",{staticClass:"mx-icon-calendar"},[e._t("icon-calendar",[t("icon-calendar")])],2)],2),e._v(" "),t("Popup",{ref:"popup",class:e.popupClass,style:e.popupStyle,attrs:{inline:e.inline,visible:e.popupVisible,"append-to-body":e.appendToBody},on:{clickoutside:e.handleClickOutSide}},[e.hasSlot("sidebar")||e.shortcuts.length?t("div",{staticClass:"mx-datepicker-sidebar"},[e._t("sidebar",null,{value:e.currentValue,emit:e.emitValue}),e._v(" "),e._l(e.shortcuts,(function(n,a){return t("button",{key:a,staticClass:"mx-btn mx-btn-text mx-btn-shortcut",attrs:{type:"button"},on:{click:function(t){return e.handleSelectShortcut(n)}}},[e._v("\n "+e._s(n.text)+"\n ")])}))],2):e._e(),e._v(" "),t("div",{staticClass:"mx-datepicker-content"},[e.hasSlot("header")?t("div",{staticClass:"mx-datepicker-header"},[e._t("header",null,{value:e.currentValue,emit:e.emitValue})],2):e._e(),e._v(" "),t("div",{staticClass:"mx-datepicker-body"},[e._t("content",[t(e.currentComponent,e._b({ref:"picker",tag:"component",on:{select:e.handleSelectDate}},"component",e.currentComponentProps,!1))],{value:e.currentValue,emit:e.emitValue})],2),e._v(" "),e.hasSlot("footer")||e.confirm?t("div",{staticClass:"mx-datepicker-footer"},[e._t("footer",null,{value:e.currentValue,emit:e.emitValue}),e._v(" "),e.confirm?t("button",{staticClass:"mx-btn mx-datepicker-btn-confirm",attrs:{type:"button"},on:{click:e.handleConfirmDate}},[e._v("\n "+e._s(e.confirmText)+"\n ")]):e._e()],2):e._e()])])],1)},staticRenderFns:[]},void 0,{name:"DatePicker",components:{IconCalendar:K,IconClose:G,Popup:Z},provide:function(){return{locale:this.locale}},props:r({},Pe.props,{value:{},valueType:{type:String,default:"date"},type:{type:String,default:"date"},format:{type:[String,Object],default:function(){var e={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",year:"YYYY",month:"YYYY-MM",time:"HH:mm:ss",week:"w"};return e[this.type]||e.date}},range:{type:Boolean,default:!1},rangeSeparator:{type:String,default:" ~ "},lang:{type:[String,Object]},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},inputClass:{default:"mx-input"},inputAttr:{type:Object,default:function(){return{}}},appendToBody:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},popupClass:{},popupStyle:{type:Object,default:function(){return{}}},inline:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:"OK"},shortcuts:{type:Array,validator:function(e){return Array.isArray(e)&&e.every((function(e){return E(e)&&"string"==typeof e.text&&"function"==typeof e.onClick}))},default:function(){return[]}}}),data:function(){return{currentValue:null,userInput:null,defaultOpen:!1}},computed:{currentComponent:function(){var e=this.range?He:Ne;return e[this.type]||e.default},currentComponentProps:function(){return r({},j(this,Object.keys(this.currentComponent.props)),{value:this.currentValue})},popupVisible:function(){return!this.disabled&&("boolean"==typeof this.open?this.open:this.defaultOpen)},innerValue:function(){var e=this.value;return this.range?(e=Array.isArray(e)?e.slice(0,2):[null,null]).map(this.value2date):this.value2date(this.value)},text:function(){var e=this;if(this.userInput)return this.userInput;if(!this.isValidValue(this.innerValue))return"";var t=this.format;return Array.isArray(this.innerValue)?this.innerValue.map((function(n){return e.formatDate(n,t)})).join(this.rangeSeparator):this.formatDate(this.innerValue,t)},showClearIcon:function(){return!this.disabled&&this.clearable&&this.text},locale:function(){return E(this.lang)?function e(n,a){if(!E(n))return{};var i=n;return E(a)&&Object.keys(a).forEach((function(o){var s=a[o];E(s)&&E(n[o])&&(s=e(n[o],s)),i=r({},i,t({},o,s))})),i}(J(),this.lang):J(this.lang)}},watch:{innerValue:{immediate:!0,handler:function(e){this.currentValue=e}}},methods:{handleClickOutSide:function(e){this.$el.contains(e.target)||this.closePopup()},parseDate:function(e,t){if(E(this.format)&&"function"==typeof this.format.parse)return this.format.parse(e,t);var n=I(this.defaultValue);return P(e,t,{locale:this.locale.formatLocale,backupDate:n})},formatDate:function(e,t){return E(this.format)&&"function"==typeof this.format.stringify?this.format.stringify(e,t):y(e,t,{locale:this.locale.formatLocale})},value2date:function(e){switch(this.valueType){case"date":return e instanceof Date?new Date(e.getTime()):new Date(NaN);case"timestamp":return"number"==typeof e?new Date(e):new Date(NaN);case"format":return"string"==typeof e?this.parseDate(e,this.format):new Date(NaN);default:return"string"==typeof e?this.parseDate(e,this.valueType):new Date(NaN)}},date2value:function(e){if(!N(e))return null;switch(this.valueType){case"date":return e;case"timestamp":return e.getTime();case"format":return this.formatDate(e,this.format);default:return this.formatDate(e,this.valueType)}},emitValue:function(e,t){var n=Array.isArray(e)?e.map(this.date2value):this.date2value(e);return this.$emit("input",n),this.$emit("change",n,t),this.afterEmitValue(t),n},afterEmitValue:function(e){e&&e!==this.type||this.closePopup()},isValidValue:function(e){return(this.range?H:N)(e)},handleSelectDate:function(e,t){this.confirm?this.currentValue=e:this.emitValue(e,t)},handleClear:function(){this.emitValue(this.range?[null,null]:null),this.$emit("clear")},handleConfirmDate:function(){var e=this.emitValue(this.currentValue);this.$emit("confirm",e)},handleSelectShortcut:function(e){if(E(e)&&"function"==typeof e.onClick){var t=e.onClick(this);t instanceof Date&&this.emitValue(t)}},openPopup:function(){this.defaultOpen=!0,this.$emit("open"),this.$emit("update:open",!0)},closePopup:function(){this.defaultOpen=!1,this.$emit("close"),this.$emit("update:open",!1)},blur:function(){this.$refs.input.blur()},focus:function(){this.$refs.input.focus()},handleInputChange:function(){var e=this;if(this.editable&&null!==this.userInput){var t=this.userInput;if(this.userInput=null,""!==t){var n=this.range?t.split(this.rangeSeparator).map((function(t){return e.parseDate(t,e.format)})):this.parseDate(t,this.format);this.isValidValue(n)?(this.emitValue(n),this.blur()):this.$emit("input-error",t)}else this.handleClear()}},handleInputInput:function(e){this.userInput=e.target.value},handleInputKeydown:function(e){var t=e.keyCode;9===t?this.closePopup():13===t&&this.handleInputChange()},handleInputBlur:function(e){this.$emit("blur",e)},handleInputFocus:function(e){this.openPopup(),this.$emit("focus",e)},hasSlot:function(e){return!(!this.$slots[e]&&!this.$scopedSlots[e])}}},void 0,!1,void 0,!1,void 0,void 0,void 0);return Ie.locale=z,Ie.install=function(e){e.component(Ie.name,Ie)},"undefined"!=typeof window&&window.Vue&&Ie.install(window.Vue),n(Ie,{CalendarPanel:ve,CalendarRange:ye,TimePanel:ke,TimeRange:xe,DatetimePanel:Pe,DatetimeRange:Ae}),Ie})); | ||
//# sourceMappingURL=index.min.js.map |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.ardz = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.arDZ = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.arsa = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.arSA = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.nlbe = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.nlBE = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.ptbr = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.ptBR = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.ugcn = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.ugCN = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.zhcn = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.zhCN = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue2-datepicker')) : | ||
typeof define === 'function' && define.amd ? define(['vue2-datepicker'], factory) : | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.zhtw = factory(global.DatePicker))); | ||
(global = global || self, (global.DatePicker = global.DatePicker || {}, global.DatePicker.lang = global.DatePicker.lang || {}, global.DatePicker.lang.zhTW = factory(global.DatePicker))); | ||
}(this, (function (DatePicker) { 'use strict'; | ||
@@ -6,0 +6,0 @@ |
@@ -11,14 +11,15 @@ { | ||
"/locale", | ||
"/index.*" | ||
"/index.*", | ||
"/scss" | ||
], | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"scripts": { | ||
"dev": "parcel ./example/dev.html --open --port 2235", | ||
"build:index": "rollup -c", | ||
"build:locale": "rollup -c rollup.locale.config.js", | ||
"build:css": "sass --style=compressed --no-source-map src/style/index.scss index.css && postcss index.css --use autoprefixer -o index.css", | ||
"build:index": "cross-env NODE_ENV=production rollup -c", | ||
"build:locale": "cross-env NODE_ENV=production rollup -c rollup.locale.config.js", | ||
"build:css": "sass --style=compressed --no-source-map src/style/index.scss index.css && postcss index.css --use autoprefixer -o index.css --no-map && cp -R src/style scss", | ||
"build": "npm run lint && npm run test && npm run clean && npm run build:index && npm run build:css && npm run build:locale", | ||
"clean": "rimraf locale index.*", | ||
"clean": "rimraf scss locale index.*", | ||
"lint": "eslint src/**/*.{js,vue}", | ||
"deploy:build": "parcel build ./example/index.html --public-url ./ --out-dir _site --no-source-maps --no-minify", | ||
"deploy:build": "cross-env NODE_ENV=production parcel build ./example/index.html --public-url ./ --out-dir _site --no-source-maps --no-minify", | ||
"deploy": "bash build/gh-pages-deploy.sh", | ||
@@ -63,3 +64,3 @@ "format": "prettier --write src/**/*", | ||
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", | ||
"@vue/babel-plugin-transform-vue-jsx": "^1.0.0", | ||
"@vue/babel-preset-jsx": "^1.1.2", | ||
"@vue/component-compiler-utils": "^3.0.0", | ||
@@ -71,9 +72,7 @@ "@vue/test-utils": "^1.0.0-beta.29", | ||
"babel-eslint": "^10.0.2", | ||
"babel-helper-vue-jsx-merge-props": "^2.0.3", | ||
"babel-jest": "^24.9.0", | ||
"babel-plugin-syntax-jsx": "^6.18.0", | ||
"babel-plugin-transform-vue-jsx": "^4.0.1", | ||
"conventional-changelog-cli": "^2.0.25", | ||
"core-js": "^3.3.5", | ||
"coveralls": "^3.0.7", | ||
"cross-env": "^6.0.3", | ||
"eslint": "^6.2.2", | ||
@@ -80,0 +79,0 @@ "eslint-config-airbnb-base": "^14.0.0", |
@@ -60,2 +60,15 @@ # vue2-datepicker | ||
## Theme | ||
If your project uses SCSS, you can change the default style variables. | ||
To create a scss file. e.g. `datepicker.scss`: | ||
```scss | ||
$default-color: #555; | ||
$primary-color: #1284e7; | ||
@import '~vue2-datepicker/scss/index.scss'; | ||
``` | ||
## Internationalization | ||
@@ -274,2 +287,3 @@ | ||
| icon-clear | custom the clear icon | | ||
| input | replace input | | ||
| header | popup header | | ||
@@ -276,0 +290,0 @@ | footer | popup footer | |
@@ -32,4 +32,17 @@ # vue2-datepicker | ||
## Usage | ||
## 主题 | ||
如果你的项目使用了 SCSS, 你可以改变默认的变量. | ||
创建一个新的文件. e.g. `datepicker.scss`: | ||
```scss | ||
$default-color: #555; | ||
$primary-color: #1284e7; | ||
@import '~vue2-datepicker/scss/index.scss'; | ||
``` | ||
## 用法 | ||
```html | ||
@@ -272,2 +285,3 @@ <script> | ||
| icon-clear | 自定义清除图标 | | ||
| input | 替换输入框 | | ||
| header | 弹出层的头部 | | ||
@@ -274,0 +288,0 @@ | footer | 弹出层的底部 | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
757279
47
134
300
10515