Vue2 Datepicker Versions Save

A datepicker / datetimepicker component for Vue2

v3.0.1

4 years ago

Bug Fixes


修复 Bug

v2.13.3

4 years ago

Bug Fixes


修复 Bug

  • 修复defaultValue的变化应该修改日历显示 (#364) (5e463bd)

v2.13.2

4 years ago

Bug Fixes


修复 Bug

v2.13.1

4 years ago

Bug Fixes


修复 Bug

v3.0.0

4 years ago

Bug Fixes

  • localization (lang) is not used for date formatting

Features

  • Add week picker

    <date-picer type="week" />
    
  • Add inline calendar without input

    <date-picker inline />
    
  • Add prop open to control the state of popup

  • Add select am/pm, when use12hours

  • Add event open and close

  • Add hourStep/minuteStep/secondStep/showHour/showMinute/showSecond/use12h to time picker for more configuration

Breaking changes

  • Need to import style separately

  • Change the default language to English. And need to import file to change the language.

  • Range selection refactoring, you can select a range on one calendar now, and need to click twice to select a range each time.

  • Change slot calendar-icon to icon-calendar.

  • appendToBody default value changes from false to true.

  • Remove not-before and not-after, use disabledDate instead.

    <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>
    
  • Remove width, use style="{ width: "" }" instead.

  • modify shortcuts api.

    [
      { text: 'today', onClick: () => new Date() // return a Date }
    ];
    
    
  • Remove prop firstDayOfWeek to locale.


修复bug

  • 修复国际化没有应用到日期的格式

新功能

  • 添加星期选择

    <date-picer type="week" />
    
  • 添加内联模式, 没有输入框

    <date-picker inline />
    
  • 添加 open 控制弹窗的状态

  • 添加 am/pm 的选择, 当使用12小时制

  • 添加事件openclose

  • 添加 hourStep/minuteStep/secondStep/showHour/showMinute/showSecond/use12h 对时间选择更多的控制

不兼容更新

  • 需要单独引入样式

  • 修改默认语音是英文, 可以自行引入语言包

  • 日期范围选择重构, 现在模式是可以在一个日历上面选择范围, 每次选择需要点击2次.

  • 修改 slot calendar-iconicon-calendar.

  • appendToBody 默认值修改为true.

  • 移除 not-beforenot-after, 用 disabledDate 代替.

    <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到语言包

v2.13.0

4 years ago

Bug Fixes

  • removed stoppropagation (864ab83)
  • the clickoutside don't work sometimes (#326) (d9619f8)

Features

  • add prop icon-day to set calendar icon day (62c3d60)

修复Bug

  • 移除阻止的事件冒泡
  • 修复自动关闭有时不生效

新功能

  • 添加属性icon-day设置日历图标的数字

v2.11.2

5 years ago

Bug Fixes

  • fecha.parse invalid return false trigger the clear error (#309) (96812ab)
  • remove last shortcut "|" (c6a6300)
  • test suites in another timezone failed (#300) (ec69590)

修复Bug

  • fecha.parse 无效的时候返回的是false导致清空时报错 (#309) (96812ab)
  • 移除最后一个快捷选项的的 "|" (c6a6300)
  • 测试集合在其他时区报错的问题 (#300) (ec69590)

v2.11.0

5 years ago

Bug Fixes

  • fix clickoutside's problem when use append-to-body (#291) (9bb6046)

Features

  • add select-year and select-month event (#290) (20d1f19)

修复Bug

新功能

  • 添加select-yearselect-month 事件 (#290) (20d1f19)

v2.10.3

5 years ago

Bug Fixes

  • fix type input don't update the value (#266) (aa20a1e)

修复bug

v2.10.2

5 years ago

Bug Fixes

  • pick minute will affect the hour (#168) (2afed88)
  • remove the append background (e7775d6)

修复bug

  • 修复选择分钟的时候会影响小时 (#168) (2afed88)
  • 移除图标的背景颜色 (e7775d6)