diff --git a/components/_util/BaseMixin.js b/components/_util/BaseMixin.js index 52d853735..01a701e44 100644 --- a/components/_util/BaseMixin.js +++ b/components/_util/BaseMixin.js @@ -16,7 +16,9 @@ export default { } else { this.$listeners[eventName](...args.slice(1)) } + return true } + return false }, }, } diff --git a/components/vc-calendar/assets/common/Calendar.less b/components/vc-calendar/assets/common/Calendar.less new file mode 100644 index 000000000..d23143c61 --- /dev/null +++ b/components/vc-calendar/assets/common/Calendar.less @@ -0,0 +1,106 @@ +.@{prefixClass} { + &-input-wrap { + position: relative; + padding: 6px; + border-bottom: 1px solid #e9e9e9; + &:after { + content: ''; + clear: both; + } + } + + &-date-input-wrap { + overflow: hidden; + } + &-time-picker { + position: absolute; + width: 100%; + top: 34px; + background-color: white; + height: 217px; + &-panel { + width: 100%; + position: relative; + .@{timePickerClass}-panel { + &-input-wrap { + display: none; + } + &-inner { + border: none; + box-shadow: none; + } + &-select { + width: 84px; + ul { + max-height: 217px; + } + li { + text-align: center; + padding: 0; + } + } + } + } + } + &-time-picker-wrap { + float: left; + width: 100%; + + .@{timePickerClass} { + width: 100%; + + &-input { + padding: 0; + border: 1px solid transparent; + outline: 0;; + height:22px; + } + + &-icon { + display: none; + } + } + } + + &-input { + border: 1px solid transparent; + width: 100%; + color: #666; + cursor: text; + line-height: 1.5; + outline: 0; + height:22px; + + &-invalid { + border-color: red; + } + } + + &-clear-btn { + z-index: 9999; + position: absolute; + right: 6px; + cursor: pointer; + overflow: hidden; + width: 20px; + height: 20px; + text-align: center; + line-height: 20px; + top: 6px; + margin: 0; + } + + &-clear-btn:after { + content: "x"; + font-size: 12px; + color: #aaa; + display: inline-block; + line-height: 1; + width: 20px; + transition: color 0.3s ease; + } + + &-clear-btn:hover:after { + color: #666; + } +} \ No newline at end of file diff --git a/components/vc-calendar/assets/common/FullCalendar.less b/components/vc-calendar/assets/common/FullCalendar.less new file mode 100644 index 000000000..b2713e218 --- /dev/null +++ b/components/vc-calendar/assets/common/FullCalendar.less @@ -0,0 +1,91 @@ +.@{prefixClass}-full { + width: 275px; + &-header { + padding: 5px 10px; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; + overflow: hidden; + + &-month-select, + &-year-select { + width: 70px; + float: right; + margin-right: 5px; + } + + &-switcher { + float: right; + display: inline-block; + &-normal:hover { + border-color: #23c0fa; + box-shadow: 0 0 2px rgba(45, 183, 245, 0.8); + cursor: pointer; + } + &-focus { + border-color: #3fc7fa; + background-color: #3fc7fa; + color: #fff; + } + > span { + float: left; + height: 28px; + line-height: 24px; + border: 1px solid #d9d9d9; + padding: 0 10px; + color: #666; + &:first-child { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-right: none; + } + &:last-child { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-left: none; + } + } + } + } +} + +.@{prefixClass}-fullscreen { + width: auto; + + .@{prefixClass}-full-header { + border-bottom: none; + } + + .@{prefixClass} { + &-column-header { + text-align: right; + padding-right: 12px; + } + &-cell { + padding: 0; + } + &-cell .@{prefixClass}-date, + &-month-panel-cell .@{prefixClass}-month-panel-month { + display: block; + height: 116px; + width: auto; + border-radius: 0; + margin: 0 4px; + border: none; + border-top: 2px solid #eee; + text-align: right; + padding-right: 8px; + } + &-selected-day .@{prefixClass}-date, + &-month-panel-selected-cell .@{prefixClass}-month-panel-month { + background-color: #ebfaff; + color: #666; + } + &-today .@{prefixClass}-date, + &-month-panel-selected-cell .@{prefixClass}-month-panel-month { + border-top-color: #3FC7FA; + color: #3FC7FA; + } + } +} diff --git a/components/vc-calendar/assets/common/Picker.less b/components/vc-calendar/assets/common/Picker.less new file mode 100644 index 000000000..0a5971784 --- /dev/null +++ b/components/vc-calendar/assets/common/Picker.less @@ -0,0 +1,10 @@ +.@{prefixClass}-picker { + position: absolute; + left: -9999px; + top: -9999px; + z-index: 1000; + + &-hidden { + display: none; + } +} diff --git a/components/vc-calendar/assets/common/RangeCalendar.less b/components/vc-calendar/assets/common/RangeCalendar.less new file mode 100644 index 000000000..286ae4a23 --- /dev/null +++ b/components/vc-calendar/assets/common/RangeCalendar.less @@ -0,0 +1,132 @@ +@input-box-height: 35px; + +.@{prefixClass}-range { + width: 502px; + overflow: hidden; + + &-part { + width: 250px; + position: relative; + + .@{prefixClass}-time-picker { + top: 69px; + &-panel { + &-select { + width: 77px; + } + } + } + } + + &-left { + float: left; + .@{prefixClass}-time-picker-panel { + &-select:last-child { + border-right: 1px solid #e9e9e9; + } + + } + } + + &-right { + float: right; + .@{prefixClass}-time-picker-panel { + left: 21px; + + &-select:first-child { + border-left: 1px solid #e9e9e9; + } + } + } + + &-middle { + position: absolute; + margin-left: -10px; + text-align: center; + height: @input-box-height; + line-height: @input-box-height; + } + .@{prefixClass}-date-panel::after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; + } + + .@{prefixClass}-input-wrap { + height: @input-box-height; + } + .@{prefixClass}-input, + .@{timePickerClass}-input { + padding: 1px 7px; + height: 22px; + } + + .@{prefixClass}-body, + .@{prefixClass}-decade-panel-body, + .@{prefixClass}-year-panel-body, + .@{prefixClass}-month-panel-body { + border-bottom: 1px solid #e9e9e9; + } + + &.@{prefixClass}-week-number { + width: 574px; + + .@{prefixClass}-range { + &-part { + width: 286px; + .@{prefixClass}-time-picker { + top: 69px; + &-panel { + &-select { + width: 89px; + } + } + } + } + &-right { + .@{prefixClass}-time-picker-panel { + left: 36px; + } + } + } + } + + .@{prefixClass}-year-panel, + .@{prefixClass}-month-panel, + .@{prefixClass}-decade-panel { + top: @input-box-height; + } + .@{prefixClass}-month-panel .@{prefixClass}-year-panel { + top: 0; + } + .@{prefixClass}-decade-panel-table, + .@{prefixClass}-year-panel-table, + .@{prefixClass}-month-panel-table { + height: 198px; + } + + .@{prefixClass}-in-range-cell { + background: #ebf4f8; + border-radius: 0; + } + + &-bottom { + text-align: right; + } + + .@{prefixClass}-footer{ + border-top: none; + padding: 0; + &-btn { + padding: 10px 12px 10px 0; + } + } + .@{prefixClass}-ok-btn { + position: static; + } + .@{prefixClass}-today-btn { + float: left; + } +} diff --git a/components/vc-calendar/assets/common/index.less b/components/vc-calendar/assets/common/index.less new file mode 100644 index 000000000..417f868b7 --- /dev/null +++ b/components/vc-calendar/assets/common/index.less @@ -0,0 +1,16 @@ +@prefixClass: rc-calendar; +@timePickerClass: rc-time-picker; + +.@{prefixClass} { + box-sizing: border-box; + * { + box-sizing: border-box; + } +} + +.@{prefixClass}-hidden { + display: none; +} + +@import "Calendar.less"; +@import "Picker.less"; \ No newline at end of file diff --git a/components/vc-calendar/assets/index.less b/components/vc-calendar/assets/index.less new file mode 100644 index 000000000..89e110593 --- /dev/null +++ b/components/vc-calendar/assets/index.less @@ -0,0 +1,10 @@ +@import "./common/index.less"; +@import "index/Picker"; +@import "index/Calendar"; +@import "index/Time"; +@import "index/TimePanel"; +@import "index/MonthPanel"; +@import "index/YearPanel"; +@import "index/DecadePanel"; +@import "common/RangeCalendar"; +@import "common/FullCalendar"; diff --git a/components/vc-calendar/assets/index/Calendar.less b/components/vc-calendar/assets/index/Calendar.less new file mode 100644 index 000000000..3da58f198 --- /dev/null +++ b/components/vc-calendar/assets/index/Calendar.less @@ -0,0 +1,291 @@ +.@{prefixClass} { + position: relative; + outline: none; + font-family: Arial, "Hiragino Sans GB", "Microsoft Yahei", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; + width: 253px; + border: 1px solid #ccc; + list-style: none; + font-size: 12px; + text-align: left; + background-color: #fff; + border-radius: 3px; + box-shadow: 0 1px 5px #ccc; + background-clip: padding-box; + border: 1px solid #ccc; + line-height: 1.5; + + &-date-panel, &-panel { + position: relative; + outline: none; + } + + &-week-number { + width: 286px; + + &-cell { + text-align: center; + } + } + + &-header { + padding: 0 10px; + height: 34px; + line-height: 30px; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; + + > a { + font-weight: bold; + display: inline-block; + padding: 0px 5px; + line-height: 34px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } + + .@{prefixClass}-prev-month-btn { + position: absolute; + left: 25px; + + &:after { + content: '‹' + } + } + + .@{prefixClass}-next-month-btn { + position: absolute; + right: 25px; + + &:after { + content: '›' + } + } + } + + &-year-select, &-month-select, &-day-select { + display: inline-block; + font-size: 12px; + font-weight: bold; + color: #666; + padding: 0 8px; + line-height: 34px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } + + &-prev-month-btn, + &-next-month-btn, + &-prev-year-btn, + &-next-year-btn { + position: absolute; + top: 0; + cursor: pointer; + color: #999; + font-family: Arial, "Hiragino Sans GB", "Microsoft Yahei", "Microsoft Sans Serif", sans-serif; + padding: 0 5px; + font-size: 16px; + display: inline-block; + line-height: 34px; + + &:hover { + color: #23c0fa; + } + } + + &-next-year-btn { + right: 0; + + &:after { + content: '»' + } + } + + &-prev-year-btn { + left: 0; + + &:after { + content: '«' + } + } + + &-body { + padding: 9px 10px 10px; + height: 217px; + } + + table { + border-collapse: collapse; + max-width: 100%; + background-color: transparent; + width: 100%; + } + + table, td, th, td { + border: none; + } + + &-table { + border-spacing: 0; + margin-bottom: 0; + } + + &-column-header { + line-height: 18px; + padding: 6px 0; + width: 33px; + text-align: center; + .@{prefixClass}-column-header-inner { + display: block; + font-weight: normal; + } + } + + &-week-number-header { + .@{prefixClass}-column-header-inner { + display: none; + } + } + + &-cell { + padding: 1px 0; + } + + &-date { + display: block; + margin: 0 auto; + color: #666; + border-radius: 4px 4px; + width: 26px; + height: 26px; + padding: 0; + background: transparent; + line-height: 26px; + text-align: center; + + &:hover { + background: #ebfaff; + cursor: pointer; + } + } + + &-selected-day &-date { + background: tint(#3fc7fa, 80%); + } + + &-selected-date &-date { + background: #3fc7fa; + color: #fff; + &:hover { + background: #3fc7fa; + } + } + + &-today &-date { + border: 1px solid #3fc7fa; + } + + &-disabled-cell &-date { + cursor: not-allowed; + color: #bcbcbc; + background: #f3f3f3; + border-radius: 0; + width: auto; + + &:hover { + background: #f3f3f3; + } + } + + &-disabled-cell-first-of-row &-date { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } + + &-disabled-cell-last-of-row &-date { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + + &-last-month-cell &-date, &-next-month-btn-day &-date { + color: #bbb; + } + + &-footer { + border-top: 1px solid #ccc; + padding: 10px 0; + text-align: center; + position: relative; + + .@{timePickerClass} { + width: 90px; + &-input { + height: 24px; + } + } + &-show-ok { + text-align: right; + .@{prefixClass} { + &-footer-btn { + padding-right: 12px; + } + + &-time-picker-btn { + margin-left: 0; + padding: 0 12px; + } + &-today-btn { + float: left; + padding-left: 12px; + } + } + } + } + + &-footer-btn { + margin-top: 2px; + + &:after { + content: 'x'; + height: 0; + font-size: 0; + overflow: hidden; + clear: both; + } + } + + &-time-picker-btn { + margin-left: 10px; + } + + &-today-btn, &-ok-btn, &-time-picker-btn { + display: inline-block; + text-align: center; + color: #f46830; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + + &-disabled { + color: #bbb; + &:hover { + color: #bbb; + } + } + } + + &-today-btn { + padding-left: 10px; + } +} diff --git a/components/vc-calendar/assets/index/DecadePanel.less b/components/vc-calendar/assets/index/DecadePanel.less new file mode 100644 index 000000000..97ac157ce --- /dev/null +++ b/components/vc-calendar/assets/index/DecadePanel.less @@ -0,0 +1,115 @@ +.@{prefixClass}-decade-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #ffffff; + z-index: 10; + position: absolute; + outline: none; +} + +.@{prefixClass}-decade-panel-hidden { + display: none; +} + +.@{prefixClass}-decade-panel-header { + padding: 0 10px; + height: 34px; + line-height: 34px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; + + > a { + font-weight: bold; + display: inline-block; + padding: 1px 5px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } +} + +.@{prefixClass}-decade-panel-prev-century-btn, .@{prefixClass}-decade-panel-next-century-btn { + position: absolute; + top: 0; +} + +.@{prefixClass}-decade-panel-next-century-btn { + &:after { + content: '»' + } +} + +.@{prefixClass}-decade-panel-prev-century-btn { + user-select: none; + left: 0; + &:after { + content: '«' + } +} + +.@{prefixClass}-decade-panel-next-century-btn { + user-select: none; + right: 0; +} + +.@{prefixClass}-decade-panel-body { + padding: 9px 10px 10px; + position: absolute; + bottom: 0; + top: 34px; +} + +.@{prefixClass}-decade-panel-table { + table-layout: fixed; + width: 100%; + height: 100%; + border-collapse: separate; +} + +.@{prefixClass}-decade-panel-cell { + text-align: center; +} + +.@{prefixClass}-decade-panel-decade { + display: block; + margin: 0 auto; + color: #666; + border-radius: 4px 4px; + height: 36px; + padding: 0; + background: transparent; + line-height: 36px; + text-align: center; + + &:hover { + background: #ebfaff; + cursor: pointer; + } +} + +.@{prefixClass}-decade-panel-selected-cell .@{prefixClass}-decade-panel-decade { + background: #3fc7fa; + color: #fff; + + &:hover { + background: #3fc7fa; + color: #fff; + } +} + +.@{prefixClass}-decade-panel-last-century-cell, .@{prefixClass}-decade-panel-next-century-cell { + .@{prefixClass}-decade-panel-decade{ + user-select: none; + -webkit-user-select: none; + color: rgba(0, 0, 0, 0.25); + } +} \ No newline at end of file diff --git a/components/vc-calendar/assets/index/Input.less b/components/vc-calendar/assets/index/Input.less new file mode 100644 index 000000000..ac081bc23 --- /dev/null +++ b/components/vc-calendar/assets/index/Input.less @@ -0,0 +1,22 @@ +.input() { + height: 25px; + position: relative; + display: inline-block; + margin: 0 0; + padding: 4px 10px; + border-radius: 6px 6px; + border: 1px solid #d9d9d9; + background-color: #ffffff; + color: #666; + line-height: 1.5; + transform: border 0.3s cubic-bezier(0.35, 0, 0.25, 1), background 0.3s cubic-bezier(0.35, 0, 0.25, 1), box-shadow 0.3s cubic-bezier(0.35, 0, 0.25, 1); + + &:hover { + border-color: #23c0fa; + } + + &:focus { + border-color: #23c0fa; + box-shadow: 0 0 3px #23c0fa; + } +} \ No newline at end of file diff --git a/components/vc-calendar/assets/index/MonthPanel.less b/components/vc-calendar/assets/index/MonthPanel.less new file mode 100644 index 000000000..6fd91d766 --- /dev/null +++ b/components/vc-calendar/assets/index/MonthPanel.less @@ -0,0 +1,135 @@ +.@{prefixClass}-month-panel { + left: 0; + top:0; + bottom: 0; + right: 0; + background: #ffffff; + z-index: 10; + position: absolute; + outline: none; +} + +.@{prefixClass}-month-panel-hidden { + display: none; +} + +.@{prefixClass}-month-panel-header { + padding: 0 10px; + height: 34px; + line-height: 30px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; + + > a { + font-weight: bold; + display: inline-block; + padding: 4px 5px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } +} + +.@{prefixClass}-month-panel-prev-year-btn, .@{prefixClass}-month-panel-next-year-btn { + position: absolute; + top: 0; +} + +.@{prefixClass}-month-panel-next-year-btn { + &:after { + content: '»' + } +} + +.@{prefixClass}-month-panel-prev-year-btn { + user-select: none; + left: 0; + + &:after { + content: '«' + } +} + +.@{prefixClass}-month-panel .@{prefixClass}-month-panel-year-select { + width: 180px; +} + +.@{prefixClass}-month-panel-year-select-arrow { + display: none; +} + +.@{prefixClass}-month-panel-next-year-btn { + user-select: none; + right: 0; +} + +.@{prefixClass}-month-panel-body { + padding: 9px 10px 10px; + position: absolute; + top: 34px; + bottom: 0; +} + +.@{prefixClass}-month-panel-table { + table-layout: fixed; + width: 100%; + height: 100%; + border-collapse: separate; +} + +.@{prefixClass}-month-panel-cell { + text-align: center; + + + + .@{prefixClass}-month-panel-month { + display: block; + width: 46px; + margin: 0 auto; + color: #666; + border-radius: 4px 4px; + height: 36px; + padding: 0; + background: transparent; + line-height: 36px; + text-align: center; + + &:hover { + background: #ebfaff; + cursor: pointer; + } + } + + &-disabled{ + .@{prefixClass}-month-panel-month { + color: #bfbfbf; + + &:hover { + background: white; + cursor: not-allowed; + } + } + } +} + +.@{prefixClass}-month-panel-selected-cell .@{prefixClass}-month-panel-month { + background: #3fc7fa; + color: #fff; + + &:hover { + background: #3fc7fa; + color: #fff; + } +} + +.@{prefixClass}-month-header-wrap { + position: relative; + height: 308px; +} diff --git a/components/vc-calendar/assets/index/Picker.less b/components/vc-calendar/assets/index/Picker.less new file mode 100644 index 000000000..69a88b2c3 --- /dev/null +++ b/components/vc-calendar/assets/index/Picker.less @@ -0,0 +1,110 @@ +.@{prefixClass} { + &-picker { + .effect() { + animation-duration: .3s; + animation-fill-mode: both; + transform-origin: 0 0; + display: block !important; + } + + &-slide-up-enter { + .effect(); + opacity: 0; + animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1); + animation-play-state: paused; + } + + &-slide-up-appear { + .effect(); + opacity: 0; + animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1); + animation-play-state: paused; + } + + &-slide-up-leave { + .effect(); + opacity: 1; + animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34); + animation-play-state: paused; + } + + &-slide-up-enter&-slide-up-enter-active&-placement-bottomLeft, + &-slide-up-enter&-slide-up-enter-active&-placement-bottomRight, + &-slide-up-appear&-slide-up-appear-active&-placement-bottomLeft, + &-slide-up-appear&-slide-up-appear-active&-placement-bottomRight { + animation-name: rcDropdownSlideUpIn; + animation-play-state: running; + } + + &-slide-up-enter&-slide-up-enter-active&-placement-topLeft, + &-slide-up-enter&-slide-up-enter-active&-placement-topRight, + &-slide-up-appear&-slide-up-appear-active&-placement-topLeft, + &-slide-up-appear&-slide-up-appear-active&-placement-topRight { + animation-name: rcDropdownSlideDownIn; + animation-play-state: running; + } + + &-slide-up-leave&-slide-up-leave-active&-placement-bottomLeft, + &-slide-up-leave&-slide-up-leave-active&-placement-bottomRight { + animation-name: rcDropdownSlideUpOut; + animation-play-state: running; + } + + &-slide-up-leave&-slide-up-leave-active&-placement-topLeft, + &-slide-up-leave&-slide-up-leave-active&-placement-topRight { + animation-name: rcDropdownSlideDownOut; + animation-play-state: running; + } + + @keyframes rcDropdownSlideUpIn { + 0% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0); + } + 100% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } + } + + @keyframes rcDropdownSlideUpOut { + 0% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } + 100% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0); + } + } + + @keyframes rcDropdownSlideDownIn { + 0% { + opacity: 0; + transform-origin: 100% 100%; + transform: scaleY(0); + } + 100% { + opacity: 1; + transform-origin: 100% 100%; + transform: scaleY(1); + } + } + @keyframes rcDropdownSlideDownOut { + 0% { + opacity: 1; + transform-origin: 100% 100%; + transform: scaleY(1); + } + 100% { + opacity: 0; + transform-origin: 100% 100%; + transform: scaleY(0); + } + } + } +} diff --git a/components/vc-calendar/assets/index/Time.less b/components/vc-calendar/assets/index/Time.less new file mode 100644 index 000000000..b7ddc9625 --- /dev/null +++ b/components/vc-calendar/assets/index/Time.less @@ -0,0 +1,6 @@ +@import "./Input.less"; + +.@{prefixClass}-time-input { + .input(); + width:40px; +} \ No newline at end of file diff --git a/components/vc-calendar/assets/index/TimePanel.less b/components/vc-calendar/assets/index/TimePanel.less new file mode 100644 index 000000000..6701a53c7 --- /dev/null +++ b/components/vc-calendar/assets/index/TimePanel.less @@ -0,0 +1,74 @@ +.@{prefixClass}-time-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #ffffff; + z-index: 10; + position: absolute; + outline: none; +} + +.@{prefixClass}-time-panel-header { + padding: 0 10px; + height: 34px; + line-height: 34px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; +} + +.@{prefixClass}-time-panel-body { + padding: 9px 10px 10px; +} + +.@{prefixClass}-time-panel-title { + width: 180px; + font-weight: bold; + display: inline-block; + padding: 4px 5px; + text-align: center; + height: 30px; + line-height: 22px; + border-radius: 4px; +} + + +.@{prefixClass}-time-panel-table { + table-layout: fixed; + width: 100%; + height:255px; + border-collapse: separate; +} + +.@{prefixClass}-time-panel-cell { + text-align: center; + height: 42px; + vertical-align: middle; +} + +.@{prefixClass}-time-panel-time { + line-height: 26px; + display: block; + border-radius: 4px; + width:26px; + margin: 0 auto; + + &:hover { + background: #ebfaff; + cursor: pointer; + } +} + + +.@{prefixClass}-time-panel-selected-cell .@{prefixClass}-time-panel-time { + background: #3fc7fa; + color: #fff; + + &:hover { + background: #3fc7fa; + color: #fff; + } +} \ No newline at end of file diff --git a/components/vc-calendar/assets/index/YearPanel.less b/components/vc-calendar/assets/index/YearPanel.less new file mode 100644 index 000000000..f629d2e9f --- /dev/null +++ b/components/vc-calendar/assets/index/YearPanel.less @@ -0,0 +1,125 @@ +.@{prefixClass}-year-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #ffffff; + z-index: 10; + position: absolute; + outline: none; +} + +.@{prefixClass}-year-panel-hidden { + display: none; +} + +.@{prefixClass}-year-panel-header { + padding: 0 10px; + height: 34px; + line-height: 30px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; + + > a { + font-weight: bold; + display: inline-block; + padding: 4px 5px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } +} + +.@{prefixClass}-year-panel-prev-decade-btn, .@{prefixClass}-year-panel-next-decade-btn { + position: absolute; + top: 0; +} + +.@{prefixClass}-year-panel-next-decade-btn { + &:after { + content: '»' + } +} + +.@{prefixClass}-year-panel-prev-decade-btn { + user-select: none; + left: 0; + + &:after { + content: '«' + } +} + +.@{prefixClass}-year-panel .@{prefixClass}-year-panel-decade-select { + width: 180px; +} + +.@{prefixClass}-year-panel-decade-select-arrow { + display: none; +} + +.@{prefixClass}-year-panel-next-decade-btn { + user-select: none; + right: 0; +} + +.@{prefixClass}-year-panel-body { + padding: 9px 10px 10px; + position: absolute; + bottom: 0; + top: 34px; +} + +.@{prefixClass}-year-panel-table { + table-layout: fixed; + width: 100%; + height: 100%; + border-collapse: separate; +} + +.@{prefixClass}-year-panel-cell { + text-align: center; +} + +.@{prefixClass}-year-panel-year { + display: block; + width: 46px; + margin: 0 auto; + color: #666; + border-radius: 4px 4px; + height: 36px; + padding: 0; + background: transparent; + line-height: 36px; + text-align: center; + + &:hover { + background: #ebfaff; + cursor: pointer; + } +} + +.@{prefixClass}-year-panel-selected-cell .@{prefixClass}-year-panel-year { + background: #3fc7fa; + color: #fff; + + &:hover { + background: #3fc7fa; + color: #fff; + } +} + +.@{prefixClass}-year-panel-last-decade-cell, .@{prefixClass}-year-panel-next-decade-cell { + .@{prefixClass}-year-panel-year{ + user-select: none; + -webkit-user-select: none; + color: rgba(0, 0, 0, 0.25); + } +} \ No newline at end of file diff --git a/components/vc-calendar/index.js b/components/vc-calendar/index.js new file mode 100644 index 000000000..07b0735c7 --- /dev/null +++ b/components/vc-calendar/index.js @@ -0,0 +1,2 @@ +import Calendar from './src/' +export default Calendar diff --git a/components/vc-calendar/src/Calendar.vue b/components/vc-calendar/src/Calendar.vue new file mode 100644 index 000000000..78a32eaba --- /dev/null +++ b/components/vc-calendar/src/Calendar.vue @@ -0,0 +1,323 @@ + \ No newline at end of file diff --git a/components/vc-calendar/src/FullCalendar.vue b/components/vc-calendar/src/FullCalendar.vue new file mode 100644 index 000000000..5fea18842 --- /dev/null +++ b/components/vc-calendar/src/FullCalendar.vue @@ -0,0 +1,147 @@ + diff --git a/components/vc-calendar/src/MonthCalendar.vue b/components/vc-calendar/src/MonthCalendar.vue new file mode 100644 index 000000000..59fea5c6a --- /dev/null +++ b/components/vc-calendar/src/MonthCalendar.vue @@ -0,0 +1,107 @@ + diff --git a/components/vc-calendar/src/Picker.vue b/components/vc-calendar/src/Picker.vue new file mode 100644 index 000000000..d9be4eca4 --- /dev/null +++ b/components/vc-calendar/src/Picker.vue @@ -0,0 +1,213 @@ + diff --git a/components/vc-calendar/src/RangeCalendar.vue b/components/vc-calendar/src/RangeCalendar.vue new file mode 100644 index 000000000..b2112a3de --- /dev/null +++ b/components/vc-calendar/src/RangeCalendar.vue @@ -0,0 +1,624 @@ + diff --git a/components/vc-calendar/src/calendar/CalendarFooter.vue b/components/vc-calendar/src/calendar/CalendarFooter.vue new file mode 100644 index 000000000..27ca42d8a --- /dev/null +++ b/components/vc-calendar/src/calendar/CalendarFooter.vue @@ -0,0 +1,82 @@ + diff --git a/components/vc-calendar/src/calendar/CalendarHeader.vue b/components/vc-calendar/src/calendar/CalendarHeader.vue new file mode 100644 index 000000000..d7915b08f --- /dev/null +++ b/components/vc-calendar/src/calendar/CalendarHeader.vue @@ -0,0 +1,212 @@ + diff --git a/components/vc-calendar/src/calendar/OkButton.vue b/components/vc-calendar/src/calendar/OkButton.vue new file mode 100644 index 000000000..33be3efc1 --- /dev/null +++ b/components/vc-calendar/src/calendar/OkButton.vue @@ -0,0 +1,23 @@ + diff --git a/components/vc-calendar/src/calendar/TimePickerButton.vue b/components/vc-calendar/src/calendar/TimePickerButton.vue new file mode 100644 index 000000000..911446ed6 --- /dev/null +++ b/components/vc-calendar/src/calendar/TimePickerButton.vue @@ -0,0 +1,29 @@ + diff --git a/components/vc-calendar/src/calendar/TodayButton.vue b/components/vc-calendar/src/calendar/TodayButton.vue new file mode 100644 index 000000000..1be37ce5d --- /dev/null +++ b/components/vc-calendar/src/calendar/TodayButton.vue @@ -0,0 +1,37 @@ + diff --git a/components/vc-calendar/src/date/DateConstants.js b/components/vc-calendar/src/date/DateConstants.js new file mode 100644 index 000000000..2b3f26ec7 --- /dev/null +++ b/components/vc-calendar/src/date/DateConstants.js @@ -0,0 +1,4 @@ +export default { + DATE_ROW_COUNT: 6, + DATE_COL_COUNT: 7, +} diff --git a/components/vc-calendar/src/date/DateInput.vue b/components/vc-calendar/src/date/DateInput.vue new file mode 100644 index 000000000..3bf316822 --- /dev/null +++ b/components/vc-calendar/src/date/DateInput.vue @@ -0,0 +1,148 @@ + diff --git a/components/vc-calendar/src/date/DateTBody.vue b/components/vc-calendar/src/date/DateTBody.vue new file mode 100644 index 000000000..0596f8123 --- /dev/null +++ b/components/vc-calendar/src/date/DateTBody.vue @@ -0,0 +1,243 @@ + diff --git a/components/vc-calendar/src/date/DateTHead.vue b/components/vc-calendar/src/date/DateTHead.vue new file mode 100644 index 000000000..2a897cb89 --- /dev/null +++ b/components/vc-calendar/src/date/DateTHead.vue @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/components/vc-calendar/src/date/DateTable.vue b/components/vc-calendar/src/date/DateTable.vue new file mode 100644 index 000000000..566efbb82 --- /dev/null +++ b/components/vc-calendar/src/date/DateTable.vue @@ -0,0 +1,20 @@ + diff --git a/components/vc-calendar/src/decade/DecadePanel.vue b/components/vc-calendar/src/decade/DecadePanel.vue new file mode 100644 index 000000000..c6ebf5ae3 --- /dev/null +++ b/components/vc-calendar/src/decade/DecadePanel.vue @@ -0,0 +1,131 @@ + diff --git a/components/vc-calendar/src/full-calendar/CalendarHeader.vue b/components/vc-calendar/src/full-calendar/CalendarHeader.vue new file mode 100644 index 000000000..33aeb9aa1 --- /dev/null +++ b/components/vc-calendar/src/full-calendar/CalendarHeader.vue @@ -0,0 +1,138 @@ + diff --git a/components/vc-calendar/src/index.js b/components/vc-calendar/src/index.js new file mode 100644 index 000000000..f7eddf605 --- /dev/null +++ b/components/vc-calendar/src/index.js @@ -0,0 +1,3 @@ +import Calendar from './Calendar' + +export default Calendar diff --git a/components/vc-calendar/src/locale/ar_EG.js b/components/vc-calendar/src/locale/ar_EG.js new file mode 100644 index 000000000..75b44ac4b --- /dev/null +++ b/components/vc-calendar/src/locale/ar_EG.js @@ -0,0 +1,27 @@ +export default { + today: 'اليوم', + now: 'الأن', + backToToday: 'العودة إلى اليوم', + ok: 'تأكيد', + clear: 'مسح', + month: 'الشهر', + year: 'السنة', + timeSelect: 'اختيار الوقت', + dateSelect: 'اختيار التاريخ', + monthSelect: 'اختيار الشهر', + yearSelect: 'اختيار السنة', + decadeSelect: 'اختيار العقد', + yearFormat: 'YYYY', + dateFormat: 'M/D/YYYY', + dayFormat: 'D', + dateTimeFormat: 'M/D/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'الشهر السابق (PageUp)', + nextMonth: 'الشهر التالى(PageDown)', + previousYear: 'العام السابق (Control + left)', + nextYear: 'العام التالى (Control + right)', + previousDecade: 'العقد السابق', + nextDecade: 'العقد التالى', + previousCentury: 'القرن السابق', + nextCentury: 'القرن التالى', +}; diff --git a/components/vc-calendar/src/locale/bg_BG.js b/components/vc-calendar/src/locale/bg_BG.js new file mode 100644 index 000000000..0dd82941a --- /dev/null +++ b/components/vc-calendar/src/locale/bg_BG.js @@ -0,0 +1,27 @@ +export default { + today: 'Днес', + now: 'Сега', + backToToday: 'Към днес', + ok: 'Добре', + clear: 'Изчистване', + month: 'Месец', + year: 'Година', + timeSelect: 'Избор на час', + dateSelect: 'Избор на дата', + monthSelect: 'Избор на месец', + yearSelect: 'Избор на година', + decadeSelect: 'Десетилетие', + yearFormat: 'YYYY', + dateFormat: 'D M YYYY', + dayFormat: 'D', + dateTimeFormat: 'D M YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Предишен месец (PageUp)', + nextMonth: 'Следващ месец (PageDown)', + previousYear: 'Последна година (Control + left)', + nextYear: 'Следваща година (Control + right)', + previousDecade: 'Предишно десетилетие', + nextDecade: 'Следващо десетилетие', + previousCentury: 'Последен век', + nextCentury: 'Следващ век', +}; diff --git a/components/vc-calendar/src/locale/ca_ES.js b/components/vc-calendar/src/locale/ca_ES.js new file mode 100644 index 000000000..d67f1a6fc --- /dev/null +++ b/components/vc-calendar/src/locale/ca_ES.js @@ -0,0 +1,27 @@ +export default { + today: 'Avui', + now: 'Ara', + backToToday: 'Tornar a avui', + ok: 'Acceptar', + clear: 'Netejar', + month: 'Mes', + year: 'Any', + timeSelect: 'Seleccionar hora', + dateSelect: 'Seleccionar data', + monthSelect: 'Escollir un mes', + yearSelect: 'Escollir un any', + decadeSelect: 'Escollir una dècada', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Mes anterior (PageUp)', + nextMonth: 'Mes següent (PageDown)', + previousYear: 'Any anterior (Control + left)', + nextYear: 'Mes següent (Control + right)', + previousDecade: 'Dècada anterior', + nextDecade: 'Dècada següent', + previousCentury: 'Segle anterior', + nextCentury: 'Segle següent', +}; diff --git a/components/vc-calendar/src/locale/cs_CZ.js b/components/vc-calendar/src/locale/cs_CZ.js new file mode 100644 index 000000000..33fa3d60f --- /dev/null +++ b/components/vc-calendar/src/locale/cs_CZ.js @@ -0,0 +1,27 @@ +export default { + today: 'Dnes', + now: 'Nyní', + backToToday: 'Zpět na dnešek', + ok: 'Ok', + clear: 'Vymazat', + month: 'Měsíc', + year: 'Rok', + timeSelect: 'Vybrat čas', + dateSelect: 'Vybrat datum', + monthSelect: 'Vyberte měsíc', + yearSelect: 'Vyberte rok', + decadeSelect: 'Vyberte dekádu', + yearFormat: 'YYYY', + dateFormat: 'D.M.YYYY', + dayFormat: 'D', + dateTimeFormat: 'D.M.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Předchozí měsíc (PageUp)', + nextMonth: 'Následující (PageDown)', + previousYear: 'Předchozí rok (Control + left)', + nextYear: 'Následující rok (Control + right)', + previousDecade: 'Předchozí dekáda', + nextDecade: 'Následující dekáda', + previousCentury: 'Předchozí století', + nextCentury: 'Následující století', +}; diff --git a/components/vc-calendar/src/locale/da_DK.js b/components/vc-calendar/src/locale/da_DK.js new file mode 100644 index 000000000..9f1311881 --- /dev/null +++ b/components/vc-calendar/src/locale/da_DK.js @@ -0,0 +1,27 @@ +export default { + today: 'I dag', + now: 'Nu', + backToToday: 'Gå til i dag', + ok: 'Ok', + clear: 'Annuller', + month: 'Måned', + year: 'År', + timeSelect: 'Vælg tidspunkt', + dateSelect: 'Vælg dato', + monthSelect: 'Vælg måned', + yearSelect: 'Vælg år', + decadeSelect: 'Vælg årti', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Forrige måned(PageUp)', + nextMonth: 'Næste måned (PageDown)', + previousYear: 'Forrige år (Control + left)', + nextYear: 'Næste r (Control + right)', + previousDecade: 'Forrige årti', + nextDecade: 'Næste årti', + previousCentury: 'Forrige århundrede', + nextCentury: 'Næste århundrede', +}; diff --git a/components/vc-calendar/src/locale/de_DE.js b/components/vc-calendar/src/locale/de_DE.js new file mode 100644 index 000000000..85161ea34 --- /dev/null +++ b/components/vc-calendar/src/locale/de_DE.js @@ -0,0 +1,27 @@ +export default { + today: 'Heute', + now: 'Jetzt', + backToToday: 'Zurück zu Heute', + ok: 'OK', + clear: 'Zurücksetzen', + month: 'Monat', + year: 'Jahr', + timeSelect: 'Zeit wählen', + dateSelect: 'Datum wählen', + monthSelect: 'Wähle einen Monat', + yearSelect: 'Wähle ein Jahr', + decadeSelect: 'Wähle ein Jahrzehnt', + yearFormat: 'YYYY', + dateFormat: 'D.M.YYYY', + dayFormat: 'D', + dateTimeFormat: 'D.M.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Vorheriger Monat (PageUp)', + nextMonth: 'Nächster Monat (PageDown)', + previousYear: 'Vorheriges Jahr (Ctrl + left)', + nextYear: 'Nächstes Jahr (Ctrl + right)', + previousDecade: 'Vorheriges Jahrzehnt', + nextDecade: 'Nächstes Jahrzehnt', + previousCentury: 'Vorheriges Jahrhundert', + nextCentury: 'Nächstes Jahrhundert', +}; diff --git a/components/vc-calendar/src/locale/el_GR.js b/components/vc-calendar/src/locale/el_GR.js new file mode 100644 index 000000000..980218d48 --- /dev/null +++ b/components/vc-calendar/src/locale/el_GR.js @@ -0,0 +1,27 @@ +export default { + today: 'Σήμερα', + now: 'Τώρα', + backToToday: 'Πίσω στη σημερινή μέρα', + ok: 'Ok', + clear: 'Καθαρισμός', + month: 'Μήνας', + year: 'Έτος', + timeSelect: 'Επιλογή ώρας', + dateSelect: 'Επιλογή ημερομηνίας', + monthSelect: 'Επιλογή μήνα', + yearSelect: 'Επιλογή έτους', + decadeSelect: 'Επιλογή δεκαετίας', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Προηγούμενος μήνας (PageUp)', + nextMonth: 'Επόμενος μήνας (PageDown)', + previousYear: 'Προηγούμενο έτος (Control + αριστερά)', + nextYear: 'Επόμενο έτος (Control + δεξιά)', + previousDecade: 'Προηγούμενη δεκαετία', + nextDecade: 'Επόμενη δεκαετία', + previousCentury: 'Προηγούμενος αιώνας', + nextCentury: 'Επόμενος αιώνας', +}; diff --git a/components/vc-calendar/src/locale/en_GB.js b/components/vc-calendar/src/locale/en_GB.js new file mode 100644 index 000000000..c8fb80a6e --- /dev/null +++ b/components/vc-calendar/src/locale/en_GB.js @@ -0,0 +1,27 @@ +export default { + today: 'Today', + now: 'Now', + backToToday: 'Back to today', + ok: 'Ok', + clear: 'Clear', + month: 'Month', + year: 'Year', + timeSelect: 'Select time', + dateSelect: 'Select date', + monthSelect: 'Choose a month', + yearSelect: 'Choose a year', + decadeSelect: 'Choose a decade', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Previous month (PageUp)', + nextMonth: 'Next month (PageDown)', + previousYear: 'Last year (Control + left)', + nextYear: 'Next year (Control + right)', + previousDecade: 'Last decade', + nextDecade: 'Next decade', + previousCentury: 'Last century', + nextCentury: 'Next century', +}; diff --git a/components/vc-calendar/src/locale/en_US.js b/components/vc-calendar/src/locale/en_US.js new file mode 100644 index 000000000..8595ce231 --- /dev/null +++ b/components/vc-calendar/src/locale/en_US.js @@ -0,0 +1,27 @@ +export default { + today: 'Today', + now: 'Now', + backToToday: 'Back to today', + ok: 'Ok', + clear: 'Clear', + month: 'Month', + year: 'Year', + timeSelect: 'Select time', + dateSelect: 'Select date', + monthSelect: 'Choose a month', + yearSelect: 'Choose a year', + decadeSelect: 'Choose a decade', + yearFormat: 'YYYY', + dateFormat: 'M/D/YYYY', + dayFormat: 'D', + dateTimeFormat: 'M/D/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Previous month (PageUp)', + nextMonth: 'Next month (PageDown)', + previousYear: 'Last year (Control + left)', + nextYear: 'Next year (Control + right)', + previousDecade: 'Last decade', + nextDecade: 'Next decade', + previousCentury: 'Last century', + nextCentury: 'Next century', +}; diff --git a/components/vc-calendar/src/locale/es_ES.js b/components/vc-calendar/src/locale/es_ES.js new file mode 100644 index 000000000..cdedd4c15 --- /dev/null +++ b/components/vc-calendar/src/locale/es_ES.js @@ -0,0 +1,27 @@ +export default { + today: 'Hoy', + now: 'Ahora', + backToToday: 'Volver a hoy', + ok: 'Aceptar', + clear: 'Limpiar', + month: 'Mes', + year: 'Año', + timeSelect: 'Seleccionar hora', + dateSelect: 'Seleccionar fecha', + monthSelect: 'Elegir un mes', + yearSelect: 'Elegir un año', + decadeSelect: 'Elegir una década', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Mes anterior (PageUp)', + nextMonth: 'Mes siguiente (PageDown)', + previousYear: 'Año anterior (Control + left)', + nextYear: 'Año siguiente (Control + right)', + previousDecade: 'Década anterior', + nextDecade: 'Década siguiente', + previousCentury: 'Siglo anterior', + nextCentury: 'Siglo siguiente', +}; diff --git a/components/vc-calendar/src/locale/et_EE.js b/components/vc-calendar/src/locale/et_EE.js new file mode 100644 index 000000000..3b8f2d75c --- /dev/null +++ b/components/vc-calendar/src/locale/et_EE.js @@ -0,0 +1,27 @@ +export default { + today: 'Täna', + now: 'Praegu', + backToToday: 'Tagasi tänase juurde', + ok: 'Ok', + clear: 'Tühista', + month: 'Kuu', + year: 'Aasta', + timeSelect: 'Vali aeg', + dateSelect: 'Vali kuupäev', + monthSelect: 'Vali kuu', + yearSelect: 'Vali aasta', + decadeSelect: 'Vali dekaad', + yearFormat: 'YYYY', + dateFormat: 'D.M.YYYY', + dayFormat: 'D', + dateTimeFormat: 'D.M.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Eelmine kuu (PageUp)', + nextMonth: 'Järgmine kuu (PageDown)', + previousYear: 'Eelmine aasta (Control + left)', + nextYear: 'Järgmine aasta (Control + right)', + previousDecade: 'Eelmine dekaad', + nextDecade: 'Järgmine dekaad', + previousCentury: 'Eelmine sajand', + nextCentury: 'Järgmine sajand', +}; diff --git a/components/vc-calendar/src/locale/fa_IR.js b/components/vc-calendar/src/locale/fa_IR.js new file mode 100644 index 000000000..43c6bc15a --- /dev/null +++ b/components/vc-calendar/src/locale/fa_IR.js @@ -0,0 +1,27 @@ +export default { + today: 'امروز', + now: 'اکنون', + backToToday: 'بازگشت به روز', + ok: 'باشه', + clear: 'پاک کردن', + month: 'ماه', + year: 'سال', + timeSelect: 'انتخاب زمان', + dateSelect: 'انتخاب تاریخ', + monthSelect: 'یک ماه را انتخاب کنید', + yearSelect: 'یک سال را انتخاب کنید', + decadeSelect: 'یک دهه را انتخاب کنید', + yearFormat: 'YYYY', + dateFormat: 'M/D/YYYY', + dayFormat: 'D', + dateTimeFormat: 'M/D/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'ماه قبل (PageUp)', + nextMonth: 'ماه بعد (PageDown)', + previousYear: 'سال قبل (Control + left)', + nextYear: 'سال بعد (Control + right)', + previousDecade: 'دهه قبل', + nextDecade: 'دهه بعد', + previousCentury: 'قرن قبل', + nextCentury: 'قرن بعد', +}; diff --git a/components/vc-calendar/src/locale/fi_FI.js b/components/vc-calendar/src/locale/fi_FI.js new file mode 100644 index 000000000..5959d305f --- /dev/null +++ b/components/vc-calendar/src/locale/fi_FI.js @@ -0,0 +1,27 @@ +export default { + today: 'Tänään', + now: 'Nyt', + backToToday: 'Tämä päivä', + ok: 'Ok', + clear: 'Tyhjennä', + month: 'Kuukausi', + year: 'Vuosi', + timeSelect: 'Valise aika', + dateSelect: 'Valitse päivä', + monthSelect: 'Valitse kuukausi', + yearSelect: 'Valitse vuosi', + decadeSelect: 'Valitse vuosikymmen', + yearFormat: 'YYYY', + dateFormat: 'D.M.YYYY', + dayFormat: 'D', + dateTimeFormat: 'D.M.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Edellinen kuukausi (PageUp)', + nextMonth: 'Seuraava kuukausi (PageDown)', + previousYear: 'Edellinen vuosi (Control + left)', + nextYear: 'Seuraava vuosi (Control + right)', + previousDecade: 'Edellinen vuosikymmen', + nextDecade: 'Seuraava vuosikymmen', + previousCentury: 'Edellinen vuosisata', + nextCentury: 'Seuraava vuosisata', +}; diff --git a/components/vc-calendar/src/locale/fr_BE.js b/components/vc-calendar/src/locale/fr_BE.js new file mode 100644 index 000000000..9f59c8216 --- /dev/null +++ b/components/vc-calendar/src/locale/fr_BE.js @@ -0,0 +1,27 @@ +export default { + today: 'Aujourd\'hui', + now: 'Maintenant', + backToToday: 'Aujourd\'hui', + ok: 'Ok', + clear: 'Rétablir', + month: 'Mois', + year: 'Année', + timeSelect: 'Sélectionner l\'heure', + dateSelect: 'Sélectionner l\'heure', + monthSelect: 'Choisissez un mois', + yearSelect: 'Choisissez une année', + decadeSelect: 'Choisissez une décennie', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Mois précédent (PageUp)', + nextMonth: 'Mois suivant (PageDown)', + previousYear: 'Année précédente (Ctrl + gauche)', + nextYear: 'Année prochaine (Ctrl + droite)', + previousDecade: 'Décennie précédente', + nextDecade: 'Décennie suivante', + previousCentury: 'Siècle précédent', + nextCentury: 'Siècle suivant', +}; diff --git a/components/vc-calendar/src/locale/fr_FR.js b/components/vc-calendar/src/locale/fr_FR.js new file mode 100644 index 000000000..257d74a5c --- /dev/null +++ b/components/vc-calendar/src/locale/fr_FR.js @@ -0,0 +1,27 @@ +export default { + today: 'Aujourd\'hui', + now: 'Maintenant', + backToToday: 'Aujourd\'hui', + ok: 'Ok', + clear: 'Rétablir', + month: 'Mois', + year: 'Année', + timeSelect: 'Sélectionner l\'heure', + dateSelect: 'Sélectionner l\'heure', + monthSelect: 'Choisissez un mois', + yearSelect: 'Choisissez une année', + decadeSelect: 'Choisissez une décennie', + yearFormat: 'YYYY', + dateFormat: 'DD/MM/YYYY', + dayFormat: 'DD', + dateTimeFormat: 'DD/MM/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Mois précédent (PageUp)', + nextMonth: 'Mois suivant (PageDown)', + previousYear: 'Année précédente (Ctrl + gauche)', + nextYear: 'Année prochaine (Ctrl + droite)', + previousDecade: 'Décennie précédente', + nextDecade: 'Décennie suivante', + previousCentury: 'Siècle précédent', + nextCentury: 'Siècle suivant', +}; diff --git a/components/vc-calendar/src/locale/hu_HU.js b/components/vc-calendar/src/locale/hu_HU.js new file mode 100644 index 000000000..3f046877b --- /dev/null +++ b/components/vc-calendar/src/locale/hu_HU.js @@ -0,0 +1,27 @@ +export default { + today: 'Ma', // 'Today', + now: 'Most', // 'Now', + backToToday: 'Vissza a mai napra', // 'Back to today', + ok: 'Ok', + clear: 'Törlés', // 'Clear', + month: 'Hónap', // 'Month', + year: 'Év', // 'Year', + timeSelect: 'Időpont kiválasztása', // 'Select time', + dateSelect: 'Dátum kiválasztása', // 'Select date', + monthSelect: 'Hónap kiválasztása', // 'Choose a month', + yearSelect: 'Év kiválasztása', // 'Choose a year', + decadeSelect: 'Évtized kiválasztása', // 'Choose a decade', + yearFormat: 'YYYY', + dateFormat: 'YYYY/MM/DD', // 'M/D/YYYY', + dayFormat: 'DD', // 'D', + dateTimeFormat: 'YYYY/MM/DD HH:mm:ss', // 'M/D/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Előző hónap (PageUp)', // 'Previous month (PageUp)', + nextMonth: 'Következő hónap (PageDown)', // 'Next month (PageDown)', + previousYear: 'Múlt év (Control + left)', // 'Last year (Control + left)', + nextYear: 'Jövő év (Control + right)', // 'Next year (Control + right)', + previousDecade: 'Előző évtized', // 'Last decade', + nextDecade: 'Következő évtized', // 'Next decade', + previousCentury: 'Múlt évszázad', // 'Last century', + nextCentury: 'Jövő évszázad', // 'Next century', +}; diff --git a/components/vc-calendar/src/locale/is_IS.js b/components/vc-calendar/src/locale/is_IS.js new file mode 100644 index 000000000..13de5e1ee --- /dev/null +++ b/components/vc-calendar/src/locale/is_IS.js @@ -0,0 +1,27 @@ +export default { + today: 'Í dag', + now: 'Núna', + backToToday: 'Til baka til dagsins í dag', + ok: 'Í lagi', + clear: 'Hreinsa', + month: 'Mánuður', + year: 'Ár', + timeSelect: 'Velja tíma', + dateSelect: 'Velja dag', + monthSelect: 'Velja mánuð', + yearSelect: 'Velja ár', + decadeSelect: 'Velja áratug', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Fyrri mánuður (PageUp)', + nextMonth: 'Næsti mánuður (PageDown)', + previousYear: 'Fyrra ár (Control + left)', + nextYear: 'Næsta ár (Control + right)', + previousDecade: 'Fyrri áratugur', + nextDecade: 'Næsti áratugur', + previousCentury: 'Fyrri öld', + nextCentury: 'Næsta öld', +}; diff --git a/components/vc-calendar/src/locale/it_IT.js b/components/vc-calendar/src/locale/it_IT.js new file mode 100644 index 000000000..a6991c335 --- /dev/null +++ b/components/vc-calendar/src/locale/it_IT.js @@ -0,0 +1,27 @@ +export default { + today: 'Oggi', + now: 'adesso', + backToToday: 'Torna ad oggi', + ok: 'Ok', + clear: 'Chiaro', + month: 'Mese', + year: 'Anno', + timeSelect: 'Seleziona il tempo', + dateSelect: 'Select date', + monthSelect: 'Seleziona la data', + yearSelect: 'Scegli un anno', + decadeSelect: 'Scegli un decennio', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Il mese scorso (PageUp)', + nextMonth: 'Il prossimo mese (PageDown)', + previousYear: 'L\'anno scorso (Control + sinistra)', + nextYear: 'L\'anno prossimo (Control + destra)', + previousDecade: 'Ultimo decennio', + nextDecade: 'Prossimo decennio', + previousCentury: 'Secolo precedente', + nextCentury: 'Prossimo secolo', +}; diff --git a/components/vc-calendar/src/locale/ja_JP.js b/components/vc-calendar/src/locale/ja_JP.js new file mode 100644 index 000000000..d49e748b3 --- /dev/null +++ b/components/vc-calendar/src/locale/ja_JP.js @@ -0,0 +1,26 @@ +export default { + today: '今日', + now: '現在時刻', + backToToday: '今日に戻る', + ok: '決定', + timeSelect: '時間を選択', + dateSelect: '日時を選択', + clear: 'クリア', + month: '月', + year: '年', + previousMonth: '前月 (ページアップキー)', + nextMonth: '翌月 (ページダウンキー)', + monthSelect: '月を選択', + yearSelect: '年を選択', + decadeSelect: '年代を選択', + yearFormat: 'YYYY年', + dayFormat: 'D日', + dateFormat: 'YYYY年M月D日', + dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒', + previousYear: '前年 (Controlを押しながら左キー)', + nextYear: '翌年 (Controlを押しながら右キー)', + previousDecade: '前の年代', + nextDecade: '次の年代', + previousCentury: '前の世紀', + nextCentury: '次の世紀', +}; diff --git a/components/vc-calendar/src/locale/ko_KR.js b/components/vc-calendar/src/locale/ko_KR.js new file mode 100644 index 000000000..5efbddfc1 --- /dev/null +++ b/components/vc-calendar/src/locale/ko_KR.js @@ -0,0 +1,27 @@ +export default { + today: '오늘', + now: '현재 시각', + backToToday: '오늘로 돌아가기', + ok: '확인', + clear: '지우기', + month: '월', + year: '년', + timeSelect: '시간 선택', + dateSelect: '날짜 선택', + monthSelect: '달 선택', + yearSelect: '연 선택', + decadeSelect: '연대 선택', + yearFormat: 'YYYY년', + dateFormat: 'YYYY-MM-DD', + dayFormat: 'Do', + dateTimeFormat: 'YYYY-MM-DD HH:mm:ss', + monthBeforeYear: false, + previousMonth: '이전 달 (PageUp)', + nextMonth: '다음 달 (PageDown)', + previousYear: '이전 해 (Control + left)', + nextYear: '다음 해 (Control + right)', + previousDecade: '이전 연대', + nextDecade: '다음 연대', + previousCentury: '이전 세기', + nextCentury: '다음 세기', +}; diff --git a/components/vc-calendar/src/locale/ku_IQ.js b/components/vc-calendar/src/locale/ku_IQ.js new file mode 100644 index 000000000..01197b038 --- /dev/null +++ b/components/vc-calendar/src/locale/ku_IQ.js @@ -0,0 +1,27 @@ +export default { + today: 'Îro', + now: 'Niha', + backToToday: 'Vegere îro', + ok: 'Temam', + clear: 'Paqij bike', + month: 'Meh', + year: 'Sal', + timeSelect: 'Demê hilbijêre', + dateSelect: 'Dîrok hilbijêre', + monthSelect: 'Meh hilbijêre', + yearSelect: 'Sal hilbijêre', + decadeSelect: 'Dehsal hilbijêre', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Meha peş (PageUp))', + nextMonth: 'Meha paş (PageDown)', + previousYear: 'Sala peş (Control + şep)', + nextYear: 'Sala paş (Control + rast)', + previousDecade: 'Dehsalen peş', + nextDecade: 'Dehsalen paş', + previousCentury: 'Sedsalen peş', + nextCentury: 'Sedsalen paş', +}; diff --git a/components/vc-calendar/src/locale/nb_NO.js b/components/vc-calendar/src/locale/nb_NO.js new file mode 100644 index 000000000..04e5babba --- /dev/null +++ b/components/vc-calendar/src/locale/nb_NO.js @@ -0,0 +1,27 @@ +export default { + today: 'I dag', + now: 'Nå', + backToToday: 'Gå til i dag', + ok: 'Ok', + clear: 'Annuller', + month: 'Måned', + year: 'År', + timeSelect: 'Velg tidspunkt', + dateSelect: 'Velg dato', + monthSelect: 'Velg måned', + yearSelect: 'Velg år', + decadeSelect: 'Velg årti', + yearFormat: 'YYYY', + dateFormat: 'DD.MM.YYYY', + dayFormat: 'DD', + dateTimeFormat: 'DD.MM.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Forrige måned(PageUp)', + nextMonth: 'Neste måned (PageDown)', + previousYear: 'Forrige år (Control + left)', + nextYear: 'Neste år (Control + right)', + previousDecade: 'Forrige tiår', + nextDecade: 'Neste tiår', + previousCentury: 'Forrige århundre', + nextCentury: 'Neste århundre', +}; diff --git a/components/vc-calendar/src/locale/nl_BE.js b/components/vc-calendar/src/locale/nl_BE.js new file mode 100644 index 000000000..6dd28fc98 --- /dev/null +++ b/components/vc-calendar/src/locale/nl_BE.js @@ -0,0 +1,27 @@ +export default { + today: 'Vandaag', + now: 'Nu', + backToToday: 'Terug naar vandaag', + ok: 'Ok', + clear: 'Reset', + month: 'Maand', + year: 'Jaar', + timeSelect: 'Selecteer tijd', + dateSelect: 'Selecteer datum', + monthSelect: 'Kies een maand', + yearSelect: 'Kies een jaar', + decadeSelect: 'Kies een decennium', + yearFormat: 'YYYY', + dateFormat: 'D-M-YYYY', + dayFormat: 'D', + dateTimeFormat: 'D-M-YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Vorige maand (PageUp)', + nextMonth: 'Volgende maand (PageDown)', + previousYear: 'Vorig jaar (Control + left)', + nextYear: 'Volgend jaar (Control + right)', + previousDecade: 'Vorig decennium', + nextDecade: 'Volgend decennium', + previousCentury: 'Vorige eeuw', + nextCentury: 'Volgende eeuw', +}; diff --git a/components/vc-calendar/src/locale/nl_NL.js b/components/vc-calendar/src/locale/nl_NL.js new file mode 100644 index 000000000..6dd28fc98 --- /dev/null +++ b/components/vc-calendar/src/locale/nl_NL.js @@ -0,0 +1,27 @@ +export default { + today: 'Vandaag', + now: 'Nu', + backToToday: 'Terug naar vandaag', + ok: 'Ok', + clear: 'Reset', + month: 'Maand', + year: 'Jaar', + timeSelect: 'Selecteer tijd', + dateSelect: 'Selecteer datum', + monthSelect: 'Kies een maand', + yearSelect: 'Kies een jaar', + decadeSelect: 'Kies een decennium', + yearFormat: 'YYYY', + dateFormat: 'D-M-YYYY', + dayFormat: 'D', + dateTimeFormat: 'D-M-YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Vorige maand (PageUp)', + nextMonth: 'Volgende maand (PageDown)', + previousYear: 'Vorig jaar (Control + left)', + nextYear: 'Volgend jaar (Control + right)', + previousDecade: 'Vorig decennium', + nextDecade: 'Volgend decennium', + previousCentury: 'Vorige eeuw', + nextCentury: 'Volgende eeuw', +}; diff --git a/components/vc-calendar/src/locale/pl_PL.js b/components/vc-calendar/src/locale/pl_PL.js new file mode 100644 index 000000000..3202a7f3b --- /dev/null +++ b/components/vc-calendar/src/locale/pl_PL.js @@ -0,0 +1,27 @@ +export default { + today: 'Dzisiaj', + now: 'Teraz', + backToToday: 'Ustaw dzisiaj', + ok: 'Ok', + clear: 'Wyczyść', + month: 'Miesiąc', + year: 'Rok', + timeSelect: 'Ustaw czas', + dateSelect: 'Ustaw datę', + monthSelect: 'Wybierz miesiąc', + yearSelect: 'Wybierz rok', + decadeSelect: 'Wybierz dekadę', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Poprzedni miesiąc (PageUp)', + nextMonth: 'Następny miesiąc (PageDown)', + previousYear: 'Ostatni rok (Ctrl + left)', + nextYear: 'Następny rok (Ctrl + right)', + previousDecade: 'Ostatnia dekada', + nextDecade: 'Następna dekada', + previousCentury: 'Ostatni wiek', + nextCentury: 'Następny wiek', +}; diff --git a/components/vc-calendar/src/locale/pt_BR.js b/components/vc-calendar/src/locale/pt_BR.js new file mode 100644 index 000000000..a94c36bf9 --- /dev/null +++ b/components/vc-calendar/src/locale/pt_BR.js @@ -0,0 +1,27 @@ +export default { + today: 'Hoje', + now: 'Agora', + backToToday: 'Voltar para hoje', + ok: 'Ok', + clear: 'Limpar', + month: 'Mês', + year: 'Ano', + timeSelect: 'Selecionar tempo', + dateSelect: 'Selecionar data', + monthSelect: 'Escolher mês', + yearSelect: 'Escolher ano', + decadeSelect: 'Escolher década', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: false, + previousMonth: 'Mês anterior (PageUp)', + nextMonth: 'Próximo mês (PageDown)', + previousYear: 'Ano anterior (Control + esquerda)', + nextYear: 'Próximo ano (Control + direita)', + previousDecade: 'Década anterior', + nextDecade: 'Próxima década', + previousCentury: 'Século anterior', + nextCentury: 'Próximo século', +}; diff --git a/components/vc-calendar/src/locale/pt_PT.js b/components/vc-calendar/src/locale/pt_PT.js new file mode 100644 index 000000000..121faba26 --- /dev/null +++ b/components/vc-calendar/src/locale/pt_PT.js @@ -0,0 +1,27 @@ +export default { + today: 'Hoje', + now: 'Agora', + backToToday: 'Hoje', + ok: 'Ok', + clear: 'Limpar', + month: 'Mês', + year: 'Ano', + timeSelect: 'Selecionar hora', + dateSelect: 'Selecionar data', + monthSelect: 'Selecionar mês', + yearSelect: 'Selecionar ano', + decadeSelect: 'Selecionar década', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Mês anterior (PageUp)', + nextMonth: 'Mês seguinte (PageDown)', + previousYear: 'Ano anterior (Control + left)', + nextYear: 'Ano seguinte (Control + right)', + previousDecade: 'Década anterior', + nextDecade: 'Década seguinte', + previousCentury: 'Século anterior', + nextCentury: 'Século seguinte', +}; diff --git a/components/vc-calendar/src/locale/ru_RU.js b/components/vc-calendar/src/locale/ru_RU.js new file mode 100644 index 000000000..5a1a8ab56 --- /dev/null +++ b/components/vc-calendar/src/locale/ru_RU.js @@ -0,0 +1,27 @@ +export default { + today: 'Сегодня', + now: 'Сейчас', + backToToday: 'Текущая дата', + ok: 'Ok', + clear: 'Очистить', + month: 'Месяц', + year: 'Год', + timeSelect: 'Выбрать время', + dateSelect: 'Выбрать дату', + monthSelect: 'Выбрать месяц', + yearSelect: 'Выбрать год', + decadeSelect: 'Выбрать десятилетие', + yearFormat: 'YYYY', + dateFormat: 'D-M-YYYY', + dayFormat: 'D', + dateTimeFormat: 'D-M-YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Предыдущий месяц (PageUp)', + nextMonth: 'Следующий месяц (PageDown)', + previousYear: 'Предыдущий год (Control + left)', + nextYear: 'Следующий год (Control + right)', + previousDecade: 'Предыдущее десятилетие', + nextDecade: 'Следущее десятилетие', + previousCentury: 'Предыдущий век', + nextCentury: 'Следующий век', +}; diff --git a/components/vc-calendar/src/locale/sk_SK.js b/components/vc-calendar/src/locale/sk_SK.js new file mode 100644 index 000000000..fadd50b49 --- /dev/null +++ b/components/vc-calendar/src/locale/sk_SK.js @@ -0,0 +1,27 @@ +export default { + today: 'Dnes', + now: 'Teraz', + backToToday: 'Späť na dnes', + ok: 'Ok', + clear: 'Vymazať', + month: 'Mesiac', + year: 'Rok', + timeSelect: 'Vybrať čas', + dateSelect: 'Vybrať dátum', + monthSelect: 'Vybrať mesiac', + yearSelect: 'Vybrať rok', + decadeSelect: 'Vybrať dekádu', + yearFormat: 'YYYY', + dateFormat: 'D.M.YYYY', + dayFormat: 'D', + dateTimeFormat: 'D.M.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Predchádzajúci mesiac (PageUp)', + nextMonth: 'Nasledujúci mesiac (PageDown)', + previousYear: 'Predchádzajúci rok (Control + left)', + nextYear: 'Nasledujúci rok (Control + right)', + previousDecade: 'Predchádzajúca dekáda', + nextDecade: 'Nasledujúca dekáda', + previousCentury: 'Predchádzajúce storočie', + nextCentury: 'Nasledujúce storočie', +}; diff --git a/components/vc-calendar/src/locale/sr_RS.js b/components/vc-calendar/src/locale/sr_RS.js new file mode 100644 index 000000000..a797bf58a --- /dev/null +++ b/components/vc-calendar/src/locale/sr_RS.js @@ -0,0 +1,27 @@ +export default { + today: 'Danas', + now: 'Sada', + backToToday: 'Vrati se na danas', + ok: 'U redu', + clear: 'Obriši', + month: 'Mesec', + year: 'Godina', + timeSelect: 'Izaberi vreme', + dateSelect: 'Izaberi datum', + monthSelect: 'Izaberi mesec', + yearSelect: 'Izaberi godinu', + decadeSelect: 'Izaberi deceniju', + yearFormat: 'YYYY', + dateFormat: 'DD.MM.YYYY', + dayFormat: 'D', + dateTimeFormat: 'DD.MM.YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Prethodni mesec (PageUp)', + nextMonth: 'Sledeći mesec (PageDown)', + previousYear: 'Prethodna godina (Control + left)', + nextYear: 'Sledeća godina (Control + right)', + previousDecade: 'Prethodna decenija', + nextDecade: 'Sledeća decenija', + previousCentury: 'Prethodni vek', + nextCentury: 'Sledeći vek', +}; diff --git a/components/vc-calendar/src/locale/sv_SE.js b/components/vc-calendar/src/locale/sv_SE.js new file mode 100644 index 000000000..faf6394b5 --- /dev/null +++ b/components/vc-calendar/src/locale/sv_SE.js @@ -0,0 +1,27 @@ +export default { + today: 'I dag', + now: 'Nu', + backToToday: 'Till idag', + ok: 'Ok', + clear: 'Avbryt', + month: 'Månad', + year: 'År', + timeSelect: 'Välj tidpunkt', + dateSelect: 'Välj datum', + monthSelect: 'Välj månad', + yearSelect: 'Välj år', + decadeSelect: 'Välj årtionde', + yearFormat: 'YYYY', + dateFormat: 'YYYY-MM-DD', + dayFormat: 'D', + dateTimeFormat: 'YYYY-MM-DD H:mm:ss', + monthBeforeYear: true, + previousMonth: 'Förra månaden (PageUp)', + nextMonth: 'Nästa månad (PageDown)', + previousYear: 'Föreg år (Control + left)', + nextYear: 'Nästa år (Control + right)', + previousDecade: 'Föreg årtionde', + nextDecade: 'Nästa årtionde', + previousCentury: 'Föreg århundrade', + nextCentury: 'Nästa århundrade', +}; diff --git a/components/vc-calendar/src/locale/th_TH.js b/components/vc-calendar/src/locale/th_TH.js new file mode 100644 index 000000000..7021d4592 --- /dev/null +++ b/components/vc-calendar/src/locale/th_TH.js @@ -0,0 +1,27 @@ +export default { + today: 'วันนี้', + now: 'ตอนนี้', + backToToday: 'กลับไปยังวันนี้', + ok: 'ตกลง', + clear: 'ลบล้าง', + month: 'เดือน', + year: 'ปี', + timeSelect: 'เลือกเวลา', + dateSelect: 'เลือกวัน', + monthSelect: 'เลือกเดือน', + yearSelect: 'เลือกปี', + decadeSelect: 'เลือกทศวรรษ', + yearFormat: 'YYYY', + dateFormat: 'D/M/YYYY', + dayFormat: 'D', + dateTimeFormat: 'D/M/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'เดือนก่อนหน้า (PageUp)', + nextMonth: 'เดือนถัดไป (PageDown)', + previousYear: 'ปีก่อนหน้า (Control + left)', + nextYear: 'ปีถัดไป (Control + right)', + previousDecade: 'ทศวรรษก่อนหน้า', + nextDecade: 'ทศวรรษถัดไป', + previousCentury: 'ศตวรรษก่อนหน้า', + nextCentury: 'ศตวรรษถัดไป', +}; diff --git a/components/vc-calendar/src/locale/tr_TR.js b/components/vc-calendar/src/locale/tr_TR.js new file mode 100644 index 000000000..317161667 --- /dev/null +++ b/components/vc-calendar/src/locale/tr_TR.js @@ -0,0 +1,27 @@ +export default { + today: 'Bugün', + now: 'Şimdi', + backToToday: 'Bugüne Geri Dön', + ok: 'tamam', + clear: 'Temizle', + month: 'Ay', + year: 'Yıl', + timeSelect: 'Zaman Seç', + dateSelect: 'Tarih Seç', + monthSelect: 'Ay Seç', + yearSelect: 'Yıl Seç', + decadeSelect: 'On Yıl Seç', + yearFormat: 'YYYY', + dateFormat: 'M/D/YYYY', + dayFormat: 'D', + dateTimeFormat: 'M/D/YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Önceki Ay (PageUp)', + nextMonth: 'Sonraki Ay (PageDown)', + previousYear: 'Önceki Yıl (Control + Sol)', + nextYear: 'Sonraki Yıl (Control + Sağ)', + previousDecade: 'Önceki On Yıl', + nextDecade: 'Sonraki On Yıl', + previousCentury: 'Önceki Yüzyıl', + nextCentury: 'Sonraki Yüzyıl', +}; diff --git a/components/vc-calendar/src/locale/ug_CN.js b/components/vc-calendar/src/locale/ug_CN.js new file mode 100644 index 000000000..7d0321e57 --- /dev/null +++ b/components/vc-calendar/src/locale/ug_CN.js @@ -0,0 +1,26 @@ +export default { + today: 'بۈگۈن', + now: 'ھازىر', + backToToday: 'بۈگۈنگە قايتىش', + ok: 'مۇقىملاشتۇرۇش', + timeSelect: 'ۋاقىت تاللاش', + dateSelect: 'كۈن تاللاش', + clear: 'تازىلاش', + month: 'ئاي', + year: 'يىل', + previousMonth: 'ئالدىنقى ئاي(ئالدىنقى بەت )', + nextMonth: 'كېلەركى ئاي (كېلەركى بەت)', + monthSelect: 'ئاي تاللاش', + yearSelect: 'يىل تاللاش', + decadeSelect: 'يىللارنى تاللاش', + yearFormat: 'YYYY-يىلى', + dayFormat: 'D-كۈنى', + dateFormat: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + dateTimeFormat: 'YYYY-يىلىM—ئاينىڭD-كۈنى، HH:mm:ss', + previousYear: 'ئالدىنقى يىلى (Controlبىلەن يۆنىلىش كونۇپكىسى)', + nextYear: 'كېلەركى يىلى (Controlبىلەن يۆنىلىش كونۇپكىسى)', + previousDecade: 'ئالدىنقى يىللار', + nextDecade: 'كېيىنكى يىللار', + previousCentury: 'ئالدىنقى ئەسىر', + nextCentury: 'كېيىنكى ئەسىر', +}; diff --git a/components/vc-calendar/src/locale/uk_UA.js b/components/vc-calendar/src/locale/uk_UA.js new file mode 100644 index 000000000..2d9c17b15 --- /dev/null +++ b/components/vc-calendar/src/locale/uk_UA.js @@ -0,0 +1,27 @@ +export default { + today: 'Сьогодні', + now: 'Зараз', + backToToday: 'Поточна дата', + ok: 'Ok', + clear: 'Очистити', + month: 'Місяць', + year: 'Рік', + timeSelect: 'Обрати час', + dateSelect: 'Обрати дату', + monthSelect: 'Обрати місяць', + yearSelect: 'Обрати рік', + decadeSelect: 'Обрати десятиріччя', + yearFormat: 'YYYY', + dateFormat: 'D-M-YYYY', + dayFormat: 'D', + dateTimeFormat: 'D-M-YYYY HH:mm:ss', + monthBeforeYear: true, + previousMonth: 'Попередній місяць (PageUp)', + nextMonth: 'Наступний місяць (PageDown)', + previousYear: 'Попередній рік (Control + left)', + nextYear: 'Наступний рік (Control + right)', + previousDecade: 'Попереднє десятиріччя', + nextDecade: 'Наступне десятиріччя', + previousCentury: 'Попереднє століття', + nextCentury: 'Наступне століття', +}; diff --git a/components/vc-calendar/src/locale/zh_CN.js b/components/vc-calendar/src/locale/zh_CN.js new file mode 100644 index 000000000..8e173b24b --- /dev/null +++ b/components/vc-calendar/src/locale/zh_CN.js @@ -0,0 +1,26 @@ +export default { + today: '今天', + now: '此刻', + backToToday: '返回今天', + ok: '确定', + timeSelect: '选择时间', + dateSelect: '选择日期', + clear: '清除', + month: '月', + year: '年', + previousMonth: '上个月 (翻页上键)', + nextMonth: '下个月 (翻页下键)', + monthSelect: '选择月份', + yearSelect: '选择年份', + decadeSelect: '选择年代', + yearFormat: 'YYYY年', + dayFormat: 'D日', + dateFormat: 'YYYY年M月D日', + dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒', + previousYear: '上一年 (Control键加左方向键)', + nextYear: '下一年 (Control键加右方向键)', + previousDecade: '上一年代', + nextDecade: '下一年代', + previousCentury: '上一世纪', + nextCentury: '下一世纪', +}; diff --git a/components/vc-calendar/src/locale/zh_TW.js b/components/vc-calendar/src/locale/zh_TW.js new file mode 100644 index 000000000..208bdda0e --- /dev/null +++ b/components/vc-calendar/src/locale/zh_TW.js @@ -0,0 +1,26 @@ +export default { + today: '今天', + now: '此刻', + backToToday: '返回今天', + ok: '確定', + timeSelect: '選擇時間', + dateSelect: '選擇日期', + clear: '清除', + month: '月', + year: '年', + previousMonth: '上個月 (翻頁上鍵)', + nextMonth: '下個月 (翻頁下鍵)', + monthSelect: '選擇月份', + yearSelect: '選擇年份', + decadeSelect: '選擇年代', + yearFormat: 'YYYY年', + dayFormat: 'D日', + dateFormat: 'YYYY年M月D日', + dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒', + previousYear: '上一年 (Control鍵加左方向鍵)', + nextYear: '下一年 (Control鍵加右方向鍵)', + previousDecade: '上一年代', + nextDecade: '下一年代', + previousCentury: '上一世紀', + nextCentury: '下一世紀', +}; diff --git a/components/vc-calendar/src/mixin/CalendarMixin.js b/components/vc-calendar/src/mixin/CalendarMixin.js new file mode 100644 index 000000000..24a030be1 --- /dev/null +++ b/components/vc-calendar/src/mixin/CalendarMixin.js @@ -0,0 +1,117 @@ +import PropTypes from '@/components/_util/vue-types' +import BaseMixin from '@/components/_util/BaseMixin' +import { hasProp } from '@/components/_util/props-util' +import moment from 'moment' +import { isAllowedDate, getTodayTime } from '../util/index' + +function getNow () { + return moment() +} + +function getNowByCurrentStateValue (value) { + let ret + if (value) { + ret = getTodayTime(value) + } else { + ret = getNow() + } + return ret +} + +const CalendarMixin = { + mixins: [BaseMixin], + props: { + value: PropTypes.object, + defaultValue: PropTypes.object, + // onKeyDown: PropTypes.func, + }, + + data () { + const props = this.$props + const sValue = props.value || props.defaultValue || getNow() + return { + sValue, + sSelectedValue: props.selectedValue || props.defaultSelectedValue, + } + }, + watch: { + value (val) { + const sValue = val || this.defaultValue || getNowByCurrentStateValue(this.sValue) + this.setState({ + sValue, + }) + }, + selectedValue (val) { + this.setState({ + sSelectedValue: val, + }) + }, + }, + methods: { + onSelect (value, cause) { + if (value) { + this.setValue(value) + } + this.setSelectedValue(value, cause) + }, + + renderRoot (newProps) { + const props = this.props + const prefixCls = props.prefixCls + + const className = { + [prefixCls]: 1, + [`${prefixCls}-hidden`]: !props.visible, + // [props.className]: !!props.className, + [newProps.class]: !!newProps.class, + } + + return ( +