File tree Expand file tree Collapse file tree 9 files changed +23
-11
lines changed Expand file tree Collapse file tree 9 files changed +23
-11
lines changed Original file line number Diff line number Diff line change 1010 }"
1111 tabindex =" -1"
1212 type =" button"
13- @click.stop =" $emit('click')"
13+ @click.prevent =" $emit('click')"
1414 @focus =" $emit('focus')"
1515 @blur =" $emit('blur')"
1616 @mouseover =" $emit('mouseover')"
Original file line number Diff line number Diff line change 2727 type =" button"
2828 tabindex =" -1"
2929 class =" datepicker-button validate flex align-center justify-content-center"
30- @click.stop =" $emit('validate')"
30+ @click.prevent =" $emit('validate')"
3131 >
3232 <span
3333 class =" datepicker-button-effect"
Original file line number Diff line number Diff line change 3333 >
3434 <TransitionGroup
3535 :name =" transitionLabelName"
36- class =" h-100 flex align-center flex-1 flex justify-content-right"
36+ class =" h-100 flex align-center flex-1 flex"
37+ :class =" reverseYMOrder ? 'justify-content-left' : 'justify-content-right'"
3738 >
3839 <CustomButton
3940 v-for =" m in [month]"
4950 <TransitionGroup
5051 :name =" transitionLabelName"
5152 class =" h-100 flex align-center flex-1 flex"
53+ :class =" reverseYMOrder ? 'justify-content-right' : 'justify-content-left'"
5254 >
5355 <CustomButton
5456 v-for =" y in [year]"
185187 noShortcuts: { type: Boolean , default: null },
186188 firstDayOfWeek: { type: Number , default: null },
187189 customShortcuts: { type: Array , default : () => ([]) },
188- visible: { type: Boolean , default: null }
190+ visible: { type: Boolean , default: null },
191+ reverseYMOrder: { type: Boolean , default: false }
189192 },
190193 data () {
191194 return {
Original file line number Diff line number Diff line change 107107
108108<script >
109109 import moment from ' moment'
110+ const YEAR_REGEX = new RegExp (' ([/, -]+)?(YYYYY?|YY|Yr)[年년年]?([/, -]+)?' )
110111
111112 export default {
112113 name: ' HeaderPicker' ,
139140 return date
140141 },
141142 year () {
142- return this .dateTime .format ( ' YYYY ' )
143+ return this .dateTime .year ( )
143144 },
144145 getDateFormatted () {
145- return this .dateTime .format (' ddd D MMM ' )
146+ return this .dateTime .format (moment . localeData ( this . locale ). longDateFormat ( ' LL ' ). replace ( YEAR_REGEX , ' ' ) )
146147 },
147148 isFormatTwelve () {
148149 return this .format ? (this .format .indexOf (' a' ) > - 1 ) || (this .format .indexOf (' A' ) > - 1 ) : false
Original file line number Diff line number Diff line change 77 :class =" {'inline': inline, 'is-dark': dark, 'visible': visible}"
88 :style =" responsivePosition"
99 class =" datetimepicker flex"
10- @click.stop
10+ @click.prevent. stop
1111 >
1212 <div
1313 :style =" [responsivePosition, width]"
2222 :only-time =" onlyTime"
2323 :format =" format"
2424 :time-format =" timeFormat"
25+ :locale =" locale"
2526 :transition-name =" transitionName"
2627 :no-time =" onlyDate"
2728 :dark =" dark"
5253 :custom-shortcuts =" customShortcuts"
5354 :no-keyboard =" noKeyboard"
5455 :locale =" locale"
56+ :reverse-y-m-order =" reverseYMOrder"
5557 @change-month =" changeMonth"
5658 @change-year-month =" changeYearMonth"
5759 @close =" $emit('close')"
141143 customShortcuts: { type: Array , default: null },
142144 noKeyboard: { type: Boolean , default: false },
143145 right: { type: Boolean , default: false },
144- behaviour: { type: Object , default : () => ({}) }
146+ behaviour: { type: Object , default : () => ({}) },
147+ reverseYMOrder: { type: Boolean , default: false }
145148 },
146149 data () {
147150 return {
Original file line number Diff line number Diff line change 3131 <div
3232 v-if =" hasPickerOpen && overlay"
3333 class =" time-picker-overlay"
34- @click.stop =" closePicker"
34+ @click.prevent. stop =" closePicker"
3535 />
3636
3737 <!-- Date picker container -->
7171 :no-keyboard =" noKeyboard"
7272 :right =" right"
7373 :behaviour =" _behaviour"
74+ :reverse-y-m-order =" reverseYMOrder"
7475 @validate =" validate"
7576 @close =" closePicker"
7677 />
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default class Month {
1616 }
1717
1818 getFormatted ( ) {
19- return this . start . format ( 'MMMM ' )
19+ return this . start . format ( 'MMM ' )
2020 }
2121
2222 getYear ( ) {
Original file line number Diff line number Diff line change @@ -56,5 +56,6 @@ export default {
5656 behaviour : { type : Object , default : ( ) => ( { } ) } ,
5757 noKeyboard : { type : Boolean , default : false } ,
5858 right : { type : Boolean , default : false } ,
59- noClearButton : { type : Boolean , default : false }
59+ noClearButton : { type : Boolean , default : false } ,
60+ reverseYMOrder : { type : Boolean , default : false }
6061}
Original file line number Diff line number Diff line change 146146.flex-grow {
147147 flex-grow : 1 ;
148148}
149+ .flex-direction-reversed {
150+ flex-direction : row-reverse ;
151+ }
You can’t perform that action at this time.
0 commit comments