primevue 3.16.2 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +2 -1
- package/accordion/Accordion.d.ts +23 -5
- package/accordion/Accordion.vue +196 -79
- package/accordion/accordion.cjs.js +204 -98
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +202 -100
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +205 -100
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +33 -5
- package/accordiontab/AccordionTab.vue +8 -1
- package/accordiontab/accordiontab.cjs.js +7 -0
- package/accordiontab/accordiontab.cjs.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +7 -0
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +7 -0
- package/accordiontab/accordiontab.min.js +1 -1
- package/api/Api.d.ts +1 -1
- package/api/api.cjs.js +321 -313
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +321 -313
- package/api/api.esm.min.js +1 -1
- package/api/api.js +321 -313
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +32 -17
- package/autocomplete/AutoComplete.vue +252 -131
- package/autocomplete/autocomplete.cjs.js +163 -118
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +161 -116
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +162 -117
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +4 -4
- package/avatar/Avatar.vue +15 -11
- package/avatar/avatar.cjs.js +11 -7
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +11 -7
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +11 -7
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +6 -9
- package/avatargroup/AvatarGroup.vue +1 -1
- package/badge/Badge.d.ts +4 -5
- package/badge/Badge.vue +16 -13
- package/badge/badge.cjs.js +14 -11
- package/badge/badge.esm.js +14 -11
- package/badge/badge.js +14 -11
- package/badgedirective/badgedirective.cjs.js +8 -10
- package/badgedirective/badgedirective.esm.js +8 -10
- package/badgedirective/badgedirective.js +8 -10
- package/blockui/BlockUI.d.ts +6 -6
- package/blockui/BlockUI.vue +13 -15
- package/blockui/blockui.cjs.js +11 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -13
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -13
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +14 -7
- package/breadcrumb/Breadcrumb.vue +16 -7
- package/breadcrumb/BreadcrumbItem.vue +24 -15
- package/breadcrumb/breadcrumb.cjs.js +39 -25
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +39 -25
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +39 -25
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +10 -7
- package/button/Button.vue +28 -17
- package/button/button.cjs.js +25 -14
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +25 -14
- package/button/button.esm.min.js +1 -1
- package/button/button.js +25 -14
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +14 -14
- package/calendar/Calendar.vue +856 -601
- package/calendar/calendar.cjs.js +714 -614
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +712 -612
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +713 -613
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +5 -7
- package/card/Card.vue +5 -5
- package/carousel/Carousel.d.ts +29 -19
- package/carousel/Carousel.vue +537 -528
- package/carousel/carousel.cjs.js +496 -493
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +496 -493
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +645 -642
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +29 -14
- package/cascadeselect/CascadeSelect.vue +197 -102
- package/cascadeselect/CascadeSelectSub.vue +50 -15
- package/cascadeselect/cascadeselect.cjs.js +185 -111
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +184 -110
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +185 -111
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +6 -7
- package/chart/Chart.vue +12 -12
- package/chart/chart.cjs.js +11 -11
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +11 -11
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +11 -11
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +12 -12
- package/checkbox/Checkbox.vue +48 -20
- package/checkbox/checkbox.cjs.js +28 -17
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +28 -17
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +28 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.d.ts +5 -5
- package/chip/Chip.vue +13 -11
- package/chip/chip.cjs.js +7 -4
- package/chip/chip.esm.js +7 -4
- package/chip/chip.js +7 -4
- package/chips/Chips.d.ts +9 -9
- package/chips/Chips.vue +89 -33
- package/chips/chips.cjs.js +48 -26
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +48 -26
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +11 -12
- package/colorpicker/ColorPicker.vue +146 -110
- package/colorpicker/colorpicker.cjs.js +113 -74
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +113 -74
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +113 -74
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +5 -6
- package/column/Column.vue +1 -1
- package/columngroup/ColumnGroup.d.ts +5 -7
- package/columngroup/ColumnGroup.vue +1 -1
- package/config/PrimeVue.d.ts +8 -3
- package/config/config.cjs.js +18 -30
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +18 -30
- package/config/config.esm.min.js +1 -1
- package/config/config.js +19 -31
- package/config/config.min.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +4 -0
- package/confirmationservice/confirmationservice.cjs.js +1 -0
- package/confirmationservice/confirmationservice.esm.js +1 -0
- package/confirmationservice/confirmationservice.js +1 -0
- package/confirmdialog/ConfirmDialog.d.ts +11 -5
- package/confirmdialog/ConfirmDialog.vue +25 -15
- package/confirmdialog/confirmdialog.cjs.js +34 -16
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +34 -16
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -17
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +5 -8
- package/confirmpopup/ConfirmPopup.vue +44 -32
- package/confirmpopup/confirmpopup.cjs.js +24 -14
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +24 -14
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +24 -14
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +43 -5
- package/contextmenu/ContextMenu.vue +449 -38
- package/contextmenu/ContextMenuSub.vue +134 -101
- package/contextmenu/contextmenu.cjs.js +639 -206
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +640 -207
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +640 -207
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +2984 -2116
- package/core/core.min.js +16 -16
- package/datatable/BodyCell.vue +93 -75
- package/datatable/ColumnFilter.vue +137 -86
- package/datatable/DataTable.d.ts +25 -26
- package/datatable/DataTable.vue +472 -298
- package/datatable/FooterCell.vue +20 -13
- package/datatable/HeaderCell.vue +108 -51
- package/datatable/HeaderCheckbox.vue +12 -5
- package/datatable/RowCheckbox.vue +14 -6
- package/datatable/RowRadioButton.vue +4 -4
- package/datatable/TableBody.vue +135 -83
- package/datatable/TableFooter.vue +17 -20
- package/datatable/TableHeader.vue +132 -52
- package/datatable/TableLoadingBody.vue +3 -3
- package/datatable/datatable.cjs.js +2674 -2537
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +2676 -2539
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +2676 -2539
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +8 -8
- package/dataview/DataView.vue +80 -66
- package/dataview/dataview.cjs.js +31 -35
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +31 -35
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +31 -35
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +5 -6
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +28 -34
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -25
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -25
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +46 -52
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/deferredcontent/DeferredContent.d.ts +6 -7
- package/deferredcontent/DeferredContent.vue +6 -9
- package/deferredcontent/deferredcontent.cjs.js +5 -8
- package/deferredcontent/deferredcontent.esm.js +5 -8
- package/deferredcontent/deferredcontent.js +5 -8
- package/dialog/Dialog.d.ts +10 -10
- package/dialog/Dialog.vue +64 -60
- package/dialog/dialog.cjs.js +50 -46
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +50 -46
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +50 -46
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +4 -5
- package/divider/Divider.vue +15 -12
- package/divider/divider.cjs.js +17 -12
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +17 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +17 -12
- package/divider/divider.min.js +1 -1
- package/dock/Dock.d.ts +36 -6
- package/dock/Dock.vue +21 -5
- package/dock/DockSub.vue +229 -55
- package/dock/dock.cjs.js +284 -106
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +284 -106
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +285 -108
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +46 -17
- package/dropdown/Dropdown.vue +271 -129
- package/dropdown/dropdown.cjs.js +213 -132
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +212 -131
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +212 -131
- package/dropdown/dropdown.min.js +1 -1
- package/dynamicdialog/DynamicDialog.d.ts +4 -4
- package/dynamicdialog/DynamicDialog.vue +10 -10
- package/dynamicdialog/dynamicdialog.cjs.js +11 -9
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +11 -9
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +11 -9
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/editor/Editor.d.ts +20 -4
- package/editor/Editor.vue +506 -466
- package/editor/editor.cjs.js +99 -45
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +82 -42
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +83 -47
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +9 -5
- package/fieldset/Fieldset.vue +28 -20
- package/fieldset/fieldset.cjs.js +31 -19
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +32 -20
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +31 -19
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileContent.vue +51 -0
- package/fileupload/FileUpload.d.ts +32 -12
- package/fileupload/FileUpload.vue +122 -102
- package/fileupload/fileupload.cjs.js +265 -160
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +265 -160
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +265 -160
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/FullCalendar.d.ts +5 -7
- package/fullcalendar/FullCalendar.vue +6 -6
- package/fullcalendar/fullcalendar.cjs.js +3 -2
- package/fullcalendar/fullcalendar.esm.js +3 -2
- package/fullcalendar/fullcalendar.js +3 -2
- package/galleria/Galleria.d.ts +4 -4
- package/galleria/Galleria.vue +39 -34
- package/galleria/GalleriaContent.vue +58 -31
- package/galleria/GalleriaItem.vue +44 -36
- package/galleria/GalleriaItemSlot.vue +2 -1
- package/galleria/GalleriaThumbnails.vue +108 -92
- package/galleria/galleria.cjs.js +181 -153
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +181 -153
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +181 -153
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +4 -5
- package/image/Image.vue +19 -15
- package/image/image.cjs.js +11 -7
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +11 -7
- package/image/image.esm.min.js +1 -1
- package/image/image.js +11 -7
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +4 -5
- package/inlinemessage/InlineMessage.vue +12 -9
- package/inlinemessage/inlinemessage.cjs.js +12 -10
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +12 -10
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +12 -10
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.d.ts +6 -6
- package/inplace/Inplace.vue +11 -11
- package/inplace/inplace.cjs.js +9 -9
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +9 -9
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +9 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/InputMask.d.ts +11 -12
- package/inputmask/InputMask.vue +119 -92
- package/inputmask/inputmask.cjs.js +116 -89
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +116 -89
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +116 -89
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +17 -17
- package/inputnumber/InputNumber.vue +247 -180
- package/inputnumber/inputnumber.cjs.js +219 -175
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +218 -174
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +219 -176
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +10 -10
- package/inputswitch/InputSwitch.vue +39 -11
- package/inputswitch/inputswitch.cjs.js +23 -9
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +23 -9
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +23 -9
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +5 -6
- package/inputtext/InputText.vue +3 -3
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.esm.js +2 -2
- package/inputtext/inputtext.js +2 -2
- package/knob/Knob.d.ts +10 -11
- package/knob/Knob.vue +47 -29
- package/knob/knob.cjs.js +27 -25
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +27 -25
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +27 -25
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +22 -13
- package/listbox/Listbox.vue +149 -98
- package/listbox/listbox.cjs.js +121 -106
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +122 -107
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +121 -106
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +32 -6
- package/megamenu/MegaMenu.vue +510 -238
- package/megamenu/MegaMenuSub.vue +231 -0
- package/megamenu/megamenu.cjs.js +837 -391
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +839 -393
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +837 -391
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +28 -8
- package/menu/Menu.vue +204 -34
- package/menu/Menuitem.vue +48 -38
- package/menu/menu.cjs.js +325 -137
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +325 -137
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +325 -137
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +19 -8
- package/menubar/Menubar.vue +536 -26
- package/menubar/MenubarSub.vue +123 -239
- package/menubar/menubar.cjs.js +708 -335
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +710 -337
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +708 -335
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +2 -2
- package/message/Message.d.ts +5 -5
- package/message/Message.vue +19 -14
- package/message/message.cjs.js +15 -10
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +15 -10
- package/message/message.esm.min.js +1 -1
- package/message/message.js +15 -10
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +46 -16
- package/multiselect/MultiSelect.vue +266 -156
- package/multiselect/multiselect.cjs.js +239 -167
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +238 -166
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +238 -166
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +5 -5
- package/orderlist/OrderList.vue +65 -60
- package/orderlist/orderlist.cjs.js +51 -53
- package/orderlist/orderlist.esm.js +51 -53
- package/orderlist/orderlist.js +51 -53
- package/organizationchart/OrganizationChart.d.ts +4 -4
- package/organizationchart/OrganizationChart.vue +13 -17
- package/organizationchart/OrganizationChartNode.vue +20 -12
- package/organizationchart/organizationchart.cjs.js +14 -16
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +14 -16
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +14 -16
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +5 -5
- package/overlaypanel/OverlayPanel.vue +60 -50
- package/overlaypanel/overlaypanel.cjs.js +40 -32
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +40 -32
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +40 -32
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +3 -3
- package/paginator/CurrentPageReport.vue +47 -47
- package/paginator/FirstPageLink.vue +11 -8
- package/paginator/JumpToPageDropdown.vue +7 -6
- package/paginator/JumpToPageInput.vue +3 -3
- package/paginator/LastPageLink.vue +11 -8
- package/paginator/NextPageLink.vue +11 -8
- package/paginator/PageLinks.vue +3 -4
- package/paginator/Paginator.d.ts +7 -7
- package/paginator/Paginator.vue +144 -49
- package/paginator/PrevPageLink.vue +11 -8
- package/paginator/RowsPerPageDropdown.vue +7 -6
- package/paginator/paginator.cjs.js +373 -259
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +374 -260
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +651 -538
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +9 -5
- package/panel/Panel.vue +29 -11
- package/panel/panel.cjs.js +24 -14
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +24 -14
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +24 -14
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +37 -6
- package/panelmenu/PanelMenu.vue +202 -88
- package/panelmenu/PanelMenuList.vue +335 -0
- package/panelmenu/PanelMenuSub.vue +130 -80
- package/panelmenu/panelmenu.cjs.js +1385 -283
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1382 -284
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1385 -284
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +12 -7
- package/password/Password.vue +158 -80
- package/password/password.cjs.js +140 -78
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +139 -77
- package/password/password.esm.min.js +1 -1
- package/password/password.js +140 -78
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +9 -9
- package/picklist/PickList.vue +99 -78
- package/picklist/picklist.cjs.js +71 -66
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +71 -66
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +71 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +3 -3
- package/portal/Portal.vue +2 -2
- package/portal/portal.cjs.js +1 -1
- package/portal/portal.esm.js +1 -1
- package/portal/portal.js +1 -1
- package/progressbar/ProgressBar.d.ts +4 -5
- package/progressbar/ProgressBar.vue +63 -51
- package/progressbar/progressbar.cjs.js +2 -2
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -2
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -2
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +5 -7
- package/progressspinner/ProgressSpinner.vue +1 -1
- package/radiobutton/RadioButton.d.ts +9 -9
- package/radiobutton/RadioButton.vue +41 -13
- package/radiobutton/radiobutton.cjs.js +24 -10
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +24 -10
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +24 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +54 -5
- package/rating/Rating.vue +88 -62
- package/rating/rating.cjs.js +105 -84
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +106 -85
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +106 -86
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +21 -2
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +340 -282
- package/resources/themes/arya-green/theme.css +340 -282
- package/resources/themes/arya-orange/theme.css +340 -282
- package/resources/themes/arya-purple/theme.css +340 -282
- package/resources/themes/bootstrap4-dark-blue/theme.css +356 -298
- package/resources/themes/bootstrap4-dark-purple/theme.css +356 -298
- package/resources/themes/bootstrap4-light-blue/theme.css +369 -311
- package/resources/themes/bootstrap4-light-purple/theme.css +369 -311
- package/resources/themes/fluent-light/theme.css +350 -292
- package/resources/themes/lara-dark-blue/theme.css +343 -285
- package/resources/themes/lara-dark-indigo/theme.css +343 -285
- package/resources/themes/lara-dark-purple/theme.css +343 -285
- package/resources/themes/lara-dark-teal/theme.css +343 -285
- package/resources/themes/lara-light-blue/theme.css +367 -309
- package/resources/themes/lara-light-indigo/theme.css +367 -309
- package/resources/themes/lara-light-purple/theme.css +367 -309
- package/resources/themes/lara-light-teal/theme.css +367 -309
- package/resources/themes/luna-amber/theme.css +372 -314
- package/resources/themes/luna-blue/theme.css +372 -314
- package/resources/themes/luna-green/theme.css +372 -314
- package/resources/themes/luna-pink/theme.css +372 -314
- package/resources/themes/md-dark-deeppurple/theme.css +413 -318
- package/resources/themes/md-dark-indigo/theme.css +413 -318
- package/resources/themes/md-light-deeppurple/theme.css +413 -318
- package/resources/themes/md-light-indigo/theme.css +413 -318
- package/resources/themes/mdc-dark-deeppurple/theme.css +413 -318
- package/resources/themes/mdc-dark-indigo/theme.css +413 -318
- package/resources/themes/mdc-light-deeppurple/theme.css +413 -318
- package/resources/themes/mdc-light-indigo/theme.css +413 -318
- package/resources/themes/nova/theme.css +336 -278
- package/resources/themes/nova-accent/theme.css +335 -277
- package/resources/themes/nova-alt/theme.css +336 -278
- package/resources/themes/nova-vue/theme.css +336 -278
- package/resources/themes/rhea/theme.css +335 -277
- package/resources/themes/saga-blue/theme.css +347 -289
- package/resources/themes/saga-green/theme.css +347 -289
- package/resources/themes/saga-orange/theme.css +347 -289
- package/resources/themes/saga-purple/theme.css +347 -289
- package/resources/themes/tailwind-light/theme.css +359 -301
- package/resources/themes/vela-blue/theme.css +347 -289
- package/resources/themes/vela-green/theme.css +347 -289
- package/resources/themes/vela-orange/theme.css +347 -289
- package/resources/themes/vela-purple/theme.css +347 -289
- package/ripple/ripple.cjs.js +19 -1
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +19 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +19 -1
- package/ripple/ripple.min.js +1 -1
- package/row/Row.d.ts +6 -9
- package/row/Row.vue +1 -1
- package/scrollpanel/ScrollPanel.d.ts +9 -5
- package/scrollpanel/ScrollPanel.vue +194 -56
- package/scrollpanel/scrollpanel.cjs.js +180 -56
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +181 -57
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +180 -56
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +5 -7
- package/scrolltop/ScrollTop.vue +18 -23
- package/scrolltop/scrolltop.cjs.js +14 -19
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +14 -19
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +14 -19
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +11 -11
- package/selectbutton/SelectButton.vue +50 -32
- package/selectbutton/selectbutton.cjs.js +30 -25
- package/selectbutton/selectbutton.esm.js +30 -25
- package/selectbutton/selectbutton.js +30 -25
- package/sidebar/Sidebar.d.ts +6 -6
- package/sidebar/Sidebar.vue +24 -14
- package/sidebar/sidebar.cjs.js +20 -10
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +20 -10
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +20 -10
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +5 -7
- package/skeleton/Skeleton.vue +12 -11
- package/skeleton/skeleton.cjs.js +10 -9
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +10 -9
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +10 -9
- package/skeleton/skeleton.min.js +1 -1
- package/slider/Slider.d.ts +7 -8
- package/slider/Slider.vue +162 -141
- package/slider/slider.cjs.js +100 -127
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +100 -127
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +100 -127
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +8 -8
- package/speeddial/SpeedDial.vue +66 -46
- package/speeddial/speeddial.cjs.js +77 -62
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +77 -62
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +77 -62
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +6 -6
- package/splitbutton/SplitButton.vue +9 -11
- package/splitbutton/splitbutton.cjs.js +7 -7
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -7
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -7
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +10 -5
- package/splitter/Splitter.vue +158 -53
- package/splitter/splitter.cjs.js +156 -52
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +157 -53
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +156 -52
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +4 -5
- package/splitterpanel/SplitterPanel.vue +3 -3
- package/splitterpanel/splitterpanel.cjs.js +2 -2
- package/splitterpanel/splitterpanel.esm.js +2 -2
- package/splitterpanel/splitterpanel.js +2 -2
- package/steps/Steps.d.ts +4 -5
- package/steps/Steps.vue +137 -30
- package/steps/steps.cjs.js +135 -36
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +136 -37
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +135 -36
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +20 -22
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -22
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +20 -22
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +13 -5
- package/tabmenu/TabMenu.vue +176 -36
- package/tabmenu/tabmenu.cjs.js +173 -42
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +173 -42
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +174 -43
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +33 -6
- package/tabpanel/TabPanel.vue +8 -1
- package/tabpanel/tabpanel.cjs.js +7 -0
- package/tabpanel/tabpanel.cjs.min.js +1 -1
- package/tabpanel/tabpanel.esm.js +7 -0
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +7 -0
- package/tabpanel/tabpanel.min.js +1 -1
- package/tabview/TabView.d.ts +22 -6
- package/tabview/TabView.vue +280 -96
- package/tabview/tabview.cjs.js +295 -132
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +296 -133
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +296 -133
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +4 -5
- package/tag/Tag.vue +13 -10
- package/tag/tag.cjs.js +10 -7
- package/tag/tag.esm.js +10 -7
- package/tag/tag.js +10 -7
- package/terminal/Terminal.d.ts +5 -7
- package/terminal/Terminal.vue +10 -10
- package/terminal/terminal.cjs.js +3 -3
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -3
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +3 -3
- package/terminal/terminal.min.js +1 -1
- package/textarea/Textarea.d.ts +5 -6
- package/textarea/Textarea.vue +7 -7
- package/textarea/textarea.cjs.js +6 -6
- package/textarea/textarea.esm.js +6 -6
- package/textarea/textarea.js +6 -6
- package/tieredmenu/TieredMenu.d.ts +48 -6
- package/tieredmenu/TieredMenu.vue +500 -58
- package/tieredmenu/TieredMenuSub.vue +126 -208
- package/tieredmenu/tieredmenu.cjs.js +684 -338
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +685 -339
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +685 -339
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +4 -5
- package/timeline/Timeline.vue +6 -10
- package/timeline/timeline.cjs.js +3 -7
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -7
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +3 -7
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +10 -13
- package/toast/Toast.vue +40 -31
- package/toast/ToastMessage.vue +29 -20
- package/toast/toast.cjs.js +56 -38
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +55 -37
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +56 -38
- package/toast/toast.min.js +1 -1
- package/toastservice/toastservice.cjs.js +1 -0
- package/toastservice/toastservice.esm.js +1 -0
- package/toastservice/toastservice.js +1 -0
- package/togglebutton/ToggleButton.d.ts +10 -10
- package/togglebutton/ToggleButton.vue +82 -23
- package/togglebutton/togglebutton.cjs.js +66 -18
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +66 -18
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +66 -18
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +8 -5
- package/toolbar/Toolbar.vue +9 -3
- package/toolbar/toolbar.cjs.js +14 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +14 -7
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +14 -7
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -24
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +37 -25
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +36 -24
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +15 -7
- package/tree/Tree.vue +66 -56
- package/tree/TreeNode.vue +70 -66
- package/tree/tree.cjs.js +99 -102
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +99 -102
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +99 -102
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +9 -9
- package/treeselect/TreeSelect.vue +130 -72
- package/treeselect/treeselect.cjs.js +89 -59
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +89 -59
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +89 -59
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +29 -19
- package/treetable/FooterCell.vue +19 -11
- package/treetable/HeaderCell.vue +44 -36
- package/treetable/TreeTable.d.ts +8 -8
- package/treetable/TreeTable.vue +229 -178
- package/treetable/TreeTableRow.vue +74 -58
- package/treetable/treetable.cjs.js +287 -253
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +287 -253
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +287 -253
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +9 -9
- package/tristatecheckbox/TriStateCheckbox.vue +39 -18
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -15
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +24 -15
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -15
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +16 -10
- package/useconfirm/UseConfirm.d.ts +1 -1
- package/useconfirm/useconfirm.cjs.js +2 -1
- package/useconfirm/useconfirm.esm.js +2 -1
- package/useconfirm/useconfirm.js +2 -1
- package/usedialog/UseDialog.d.ts +1 -1
- package/usedialog/usedialog.cjs.js +2 -1
- package/usedialog/usedialog.esm.js +2 -1
- package/usedialog/usedialog.js +2 -1
- package/usetoast/usetoast.cjs.js +2 -1
- package/usetoast/usetoast.esm.js +2 -1
- package/usetoast/usetoast.js +2 -1
- package/utils/Utils.d.ts +10 -5
- package/utils/utils.cjs.js +209 -156
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +209 -156
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +209 -156
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +335 -3
- package/vetur-tags.json +112 -19
- package/virtualscroller/VirtualScroller.d.ts +9 -9
- package/virtualscroller/VirtualScroller.vue +108 -96
- package/virtualscroller/virtualscroller.cjs.js +87 -89
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +87 -89
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +87 -89
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1183 -73
package/calendar/calendar.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.calendar = (function (
|
|
2
|
+
this.primevue.calendar = (function (Button, OverlayEventBus, Portal, Ripple, utils, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
|
-
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
8
7
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
9
|
-
var
|
|
8
|
+
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
10
9
|
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
10
|
+
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
11
11
|
|
|
12
12
|
var script = {
|
|
13
13
|
name: 'Calendar',
|
|
@@ -171,17 +171,41 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
171
171
|
type: String,
|
|
172
172
|
default: null
|
|
173
173
|
},
|
|
174
|
-
id:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
174
|
+
id: {
|
|
175
|
+
type: String,
|
|
176
|
+
default: null
|
|
177
|
+
},
|
|
178
|
+
inputId: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: null
|
|
181
|
+
},
|
|
182
|
+
inputClass: {
|
|
183
|
+
type: String,
|
|
184
|
+
default: null
|
|
185
|
+
},
|
|
186
|
+
inputStyle: {
|
|
187
|
+
type: null,
|
|
188
|
+
default: null
|
|
189
|
+
},
|
|
190
|
+
inputProps: {
|
|
191
|
+
type: null,
|
|
192
|
+
default: null
|
|
193
|
+
},
|
|
194
|
+
panelClass: {
|
|
195
|
+
type: String,
|
|
196
|
+
default: null
|
|
197
|
+
},
|
|
198
|
+
panelStyle: {
|
|
199
|
+
type: null,
|
|
200
|
+
default: null
|
|
201
|
+
},
|
|
202
|
+
panelProps: {
|
|
203
|
+
type: null,
|
|
204
|
+
default: null
|
|
205
|
+
},
|
|
182
206
|
'aria-labelledby': {
|
|
183
207
|
type: String,
|
|
184
|
-
|
|
208
|
+
default: null
|
|
185
209
|
},
|
|
186
210
|
'aria-label': {
|
|
187
211
|
type: String,
|
|
@@ -200,6 +224,55 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
200
224
|
timePickerTimer: null,
|
|
201
225
|
preventFocus: false,
|
|
202
226
|
typeUpdate: false,
|
|
227
|
+
data() {
|
|
228
|
+
return {
|
|
229
|
+
currentMonth: null,
|
|
230
|
+
currentYear: null,
|
|
231
|
+
currentHour: null,
|
|
232
|
+
currentMinute: null,
|
|
233
|
+
currentSecond: null,
|
|
234
|
+
pm: null,
|
|
235
|
+
focused: false,
|
|
236
|
+
overlayVisible: false,
|
|
237
|
+
currentView: this.view
|
|
238
|
+
};
|
|
239
|
+
},
|
|
240
|
+
watch: {
|
|
241
|
+
modelValue(newValue) {
|
|
242
|
+
this.updateCurrentMetaData();
|
|
243
|
+
|
|
244
|
+
if (!this.typeUpdate && !this.inline && this.input) {
|
|
245
|
+
this.input.value = this.formatValue(newValue);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
this.typeUpdate = false;
|
|
249
|
+
},
|
|
250
|
+
showTime() {
|
|
251
|
+
this.updateCurrentMetaData();
|
|
252
|
+
},
|
|
253
|
+
months() {
|
|
254
|
+
if (this.overlay) {
|
|
255
|
+
if (!this.focused) {
|
|
256
|
+
if (this.inline) {
|
|
257
|
+
this.preventFocus = true;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
setTimeout(this.updateFocus, 0);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
numberOfMonths() {
|
|
265
|
+
this.destroyResponsiveStyleElement();
|
|
266
|
+
this.createResponsiveStyle();
|
|
267
|
+
},
|
|
268
|
+
responsiveOptions() {
|
|
269
|
+
this.destroyResponsiveStyleElement();
|
|
270
|
+
this.createResponsiveStyle();
|
|
271
|
+
},
|
|
272
|
+
currentView() {
|
|
273
|
+
Promise.resolve(null).then(() => this.alignOverlay());
|
|
274
|
+
}
|
|
275
|
+
},
|
|
203
276
|
created() {
|
|
204
277
|
this.updateCurrentMetaData();
|
|
205
278
|
},
|
|
@@ -217,8 +290,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
217
290
|
this.overlay.style.width = utils.DomHandler.getOuterWidth(this.$el) + 'px';
|
|
218
291
|
}
|
|
219
292
|
}
|
|
220
|
-
}
|
|
221
|
-
else {
|
|
293
|
+
} else {
|
|
222
294
|
this.input.value = this.formatValue(this.modelValue);
|
|
223
295
|
}
|
|
224
296
|
},
|
|
@@ -243,6 +315,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
243
315
|
if (this.mask) {
|
|
244
316
|
this.destroyMask();
|
|
245
317
|
}
|
|
318
|
+
|
|
246
319
|
this.destroyResponsiveStyleElement();
|
|
247
320
|
|
|
248
321
|
this.unbindOutsideClickListener();
|
|
@@ -256,51 +329,9 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
256
329
|
if (this.overlay && this.autoZIndex) {
|
|
257
330
|
utils.ZIndexUtils.clear(this.overlay);
|
|
258
331
|
}
|
|
332
|
+
|
|
259
333
|
this.overlay = null;
|
|
260
334
|
},
|
|
261
|
-
data() {
|
|
262
|
-
return {
|
|
263
|
-
currentMonth: null,
|
|
264
|
-
currentYear: null,
|
|
265
|
-
currentHour: null,
|
|
266
|
-
currentMinute: null,
|
|
267
|
-
currentSecond: null,
|
|
268
|
-
pm: null,
|
|
269
|
-
focused: false,
|
|
270
|
-
overlayVisible: false,
|
|
271
|
-
currentView: this.view
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
watch: {
|
|
275
|
-
modelValue(newValue) {
|
|
276
|
-
this.updateCurrentMetaData();
|
|
277
|
-
if (!this.typeUpdate && !this.inline && this.input) {
|
|
278
|
-
this.input.value = this.formatValue(newValue);
|
|
279
|
-
}
|
|
280
|
-
this.typeUpdate = false;
|
|
281
|
-
},
|
|
282
|
-
showTime() {
|
|
283
|
-
this.updateCurrentMetaData();
|
|
284
|
-
},
|
|
285
|
-
months() {
|
|
286
|
-
if (this.overlay) {
|
|
287
|
-
if (!this.focused) {
|
|
288
|
-
setTimeout(this.updateFocus, 0);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
numberOfMonths() {
|
|
293
|
-
this.destroyResponsiveStyleElement();
|
|
294
|
-
this.createResponsiveStyle();
|
|
295
|
-
},
|
|
296
|
-
responsiveOptions() {
|
|
297
|
-
this.destroyResponsiveStyleElement();
|
|
298
|
-
this.createResponsiveStyle();
|
|
299
|
-
},
|
|
300
|
-
currentView() {
|
|
301
|
-
Promise.resolve(null).then(() => this.alignOverlay());
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
335
|
methods: {
|
|
305
336
|
isComparable() {
|
|
306
337
|
return this.modelValue != null && typeof this.modelValue !== 'string';
|
|
@@ -313,25 +344,23 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
313
344
|
if (this.modelValue) {
|
|
314
345
|
if (this.isSingleSelection()) {
|
|
315
346
|
return this.isDateEquals(this.modelValue, dateMeta);
|
|
316
|
-
}
|
|
317
|
-
else if (this.isMultipleSelection()) {
|
|
347
|
+
} else if (this.isMultipleSelection()) {
|
|
318
348
|
let selected = false;
|
|
349
|
+
|
|
319
350
|
for (let date of this.modelValue) {
|
|
320
351
|
selected = this.isDateEquals(date, dateMeta);
|
|
352
|
+
|
|
321
353
|
if (selected) {
|
|
322
354
|
break;
|
|
323
355
|
}
|
|
324
356
|
}
|
|
325
357
|
|
|
326
358
|
return selected;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
if (this.modelValue[1])
|
|
330
|
-
return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);
|
|
359
|
+
} else if (this.isRangeSelection()) {
|
|
360
|
+
if (this.modelValue[1]) return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);
|
|
331
361
|
else {
|
|
332
362
|
return this.isDateEquals(this.modelValue[0], dateMeta);
|
|
333
363
|
}
|
|
334
|
-
|
|
335
364
|
}
|
|
336
365
|
}
|
|
337
366
|
|
|
@@ -341,7 +370,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
341
370
|
if (this.isComparable()) {
|
|
342
371
|
let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
343
372
|
|
|
344
|
-
return !this.isMultipleSelection() ?
|
|
373
|
+
return !this.isMultipleSelection() ? value.getMonth() === month && value.getFullYear() === this.currentYear : false;
|
|
345
374
|
}
|
|
346
375
|
|
|
347
376
|
return false;
|
|
@@ -350,21 +379,21 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
350
379
|
if (this.isComparable()) {
|
|
351
380
|
let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
352
381
|
|
|
353
|
-
return !this.isMultipleSelection() && this.isComparable() ?
|
|
382
|
+
return !this.isMultipleSelection() && this.isComparable() ? value.getFullYear() === year : false;
|
|
354
383
|
}
|
|
355
384
|
|
|
356
385
|
return false;
|
|
357
386
|
},
|
|
358
387
|
isDateEquals(value, dateMeta) {
|
|
359
|
-
if (value)
|
|
360
|
-
|
|
361
|
-
else
|
|
362
|
-
return false;
|
|
388
|
+
if (value) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
|
|
389
|
+
else return false;
|
|
363
390
|
},
|
|
364
391
|
isDateBetween(start, end, dateMeta) {
|
|
365
392
|
let between = false;
|
|
393
|
+
|
|
366
394
|
if (start && end) {
|
|
367
395
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
396
|
+
|
|
368
397
|
return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();
|
|
369
398
|
}
|
|
370
399
|
|
|
@@ -372,11 +401,13 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
372
401
|
},
|
|
373
402
|
getFirstDayOfMonthIndex(month, year) {
|
|
374
403
|
let day = new Date();
|
|
404
|
+
|
|
375
405
|
day.setDate(1);
|
|
376
406
|
day.setMonth(month);
|
|
377
407
|
day.setFullYear(year);
|
|
378
408
|
|
|
379
409
|
let dayIndex = day.getDay() + this.sundayIndex;
|
|
410
|
+
|
|
380
411
|
return dayIndex >= 7 ? dayIndex - 7 : dayIndex;
|
|
381
412
|
},
|
|
382
413
|
getDaysCountInMonth(month, year) {
|
|
@@ -384,6 +415,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
384
415
|
},
|
|
385
416
|
getDaysCountInPrevMonth(month, year) {
|
|
386
417
|
let prev = this.getPreviousMonthAndYear(month, year);
|
|
418
|
+
|
|
387
419
|
return this.getDaysCountInMonth(prev.month, prev.year);
|
|
388
420
|
},
|
|
389
421
|
getPreviousMonthAndYear(month, year) {
|
|
@@ -392,13 +424,12 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
392
424
|
if (month === 0) {
|
|
393
425
|
m = 11;
|
|
394
426
|
y = year - 1;
|
|
395
|
-
}
|
|
396
|
-
else {
|
|
427
|
+
} else {
|
|
397
428
|
m = month - 1;
|
|
398
429
|
y = year;
|
|
399
430
|
}
|
|
400
431
|
|
|
401
|
-
return {
|
|
432
|
+
return { month: m, year: y };
|
|
402
433
|
},
|
|
403
434
|
getNextMonthAndYear(month, year) {
|
|
404
435
|
let m, y;
|
|
@@ -406,13 +437,12 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
406
437
|
if (month === 11) {
|
|
407
438
|
m = 0;
|
|
408
439
|
y = year + 1;
|
|
409
|
-
}
|
|
410
|
-
else {
|
|
440
|
+
} else {
|
|
411
441
|
m = month + 1;
|
|
412
442
|
y = year;
|
|
413
443
|
}
|
|
414
444
|
|
|
415
|
-
return {
|
|
445
|
+
return { month: m, year: y };
|
|
416
446
|
},
|
|
417
447
|
daylightSavingAdjust(date) {
|
|
418
448
|
if (!date) {
|
|
@@ -439,12 +469,10 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
439
469
|
if (this.minDate) {
|
|
440
470
|
if (this.minDate.getFullYear() > year) {
|
|
441
471
|
validMin = false;
|
|
442
|
-
}
|
|
443
|
-
else if (this.minDate.getFullYear() === year) {
|
|
472
|
+
} else if (this.minDate.getFullYear() === year) {
|
|
444
473
|
if (this.minDate.getMonth() > month) {
|
|
445
474
|
validMin = false;
|
|
446
|
-
}
|
|
447
|
-
else if (this.minDate.getMonth() === month) {
|
|
475
|
+
} else if (this.minDate.getMonth() === month) {
|
|
448
476
|
if (this.minDate.getDate() > day) {
|
|
449
477
|
validMin = false;
|
|
450
478
|
}
|
|
@@ -455,12 +483,10 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
455
483
|
if (this.maxDate) {
|
|
456
484
|
if (this.maxDate.getFullYear() < year) {
|
|
457
485
|
validMax = false;
|
|
458
|
-
}
|
|
459
|
-
else if (this.maxDate.getFullYear() === year) {
|
|
486
|
+
} else if (this.maxDate.getFullYear() === year) {
|
|
460
487
|
if (this.maxDate.getMonth() < month) {
|
|
461
488
|
validMax = false;
|
|
462
|
-
}
|
|
463
|
-
else if (this.maxDate.getMonth() === month) {
|
|
489
|
+
} else if (this.maxDate.getMonth() === month) {
|
|
464
490
|
if (this.maxDate.getDate() < day) {
|
|
465
491
|
validMax = false;
|
|
466
492
|
}
|
|
@@ -469,11 +495,11 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
469
495
|
}
|
|
470
496
|
|
|
471
497
|
if (this.disabledDates) {
|
|
472
|
-
validDate = !this.isDateDisabled(day,month,year);
|
|
498
|
+
validDate = !this.isDateDisabled(day, month, year);
|
|
473
499
|
}
|
|
474
500
|
|
|
475
501
|
if (this.disabledDays) {
|
|
476
|
-
validDay = !this.isDayDisabled(day,month,year);
|
|
502
|
+
validDay = !this.isDayDisabled(day, month, year);
|
|
477
503
|
}
|
|
478
504
|
|
|
479
505
|
return validMin && validMax && validDate && validDay;
|
|
@@ -482,10 +508,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
482
508
|
el.setAttribute(this.attributeSelector, '');
|
|
483
509
|
|
|
484
510
|
if (this.autoZIndex) {
|
|
485
|
-
if (this.touchUI)
|
|
486
|
-
|
|
487
|
-
else
|
|
488
|
-
utils.ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
|
|
511
|
+
if (this.touchUI) utils.ZIndexUtils.set('modal', el, this.baseZIndex || this.$primevue.config.zIndex.modal);
|
|
512
|
+
else utils.ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
|
|
489
513
|
}
|
|
490
514
|
|
|
491
515
|
this.alignOverlay();
|
|
@@ -515,14 +539,14 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
515
539
|
this.overlay = null;
|
|
516
540
|
},
|
|
517
541
|
onPrevButtonClick(event) {
|
|
518
|
-
if(this.showOtherMonths) {
|
|
519
|
-
this.navigationState = {backward: true, button: true};
|
|
542
|
+
if (this.showOtherMonths) {
|
|
543
|
+
this.navigationState = { backward: true, button: true };
|
|
520
544
|
this.navBackward(event);
|
|
521
545
|
}
|
|
522
546
|
},
|
|
523
547
|
onNextButtonClick(event) {
|
|
524
|
-
if(this.showOtherMonths) {
|
|
525
|
-
this.navigationState = {backward: false, button: true};
|
|
548
|
+
if (this.showOtherMonths) {
|
|
549
|
+
this.navigationState = { backward: false, button: true };
|
|
526
550
|
this.navForward(event);
|
|
527
551
|
}
|
|
528
552
|
},
|
|
@@ -535,24 +559,20 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
535
559
|
|
|
536
560
|
if (this.currentView === 'month') {
|
|
537
561
|
this.decrementYear();
|
|
538
|
-
}
|
|
539
|
-
else if (this.currentView === 'year') {
|
|
562
|
+
} else if (this.currentView === 'year') {
|
|
540
563
|
this.decrementDecade();
|
|
541
|
-
}
|
|
542
|
-
else {
|
|
564
|
+
} else {
|
|
543
565
|
if (event.shiftKey) {
|
|
544
566
|
this.decrementYear();
|
|
545
|
-
}
|
|
546
|
-
else {
|
|
567
|
+
} else {
|
|
547
568
|
if (this.currentMonth === 0) {
|
|
548
569
|
this.currentMonth = 11;
|
|
549
570
|
this.decrementYear();
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
571
|
+
} else {
|
|
552
572
|
this.currentMonth--;
|
|
553
573
|
}
|
|
554
574
|
|
|
555
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
575
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
556
576
|
}
|
|
557
577
|
}
|
|
558
578
|
},
|
|
@@ -565,24 +585,20 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
565
585
|
|
|
566
586
|
if (this.currentView === 'month') {
|
|
567
587
|
this.incrementYear();
|
|
568
|
-
}
|
|
569
|
-
else if (this.currentView === 'year') {
|
|
588
|
+
} else if (this.currentView === 'year') {
|
|
570
589
|
this.incrementDecade();
|
|
571
|
-
}
|
|
572
|
-
else {
|
|
590
|
+
} else {
|
|
573
591
|
if (event.shiftKey) {
|
|
574
592
|
this.incrementYear();
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
593
|
+
} else {
|
|
577
594
|
if (this.currentMonth === 11) {
|
|
578
595
|
this.currentMonth = 0;
|
|
579
596
|
this.incrementYear();
|
|
580
|
-
}
|
|
581
|
-
else {
|
|
597
|
+
} else {
|
|
582
598
|
this.currentMonth++;
|
|
583
599
|
}
|
|
584
600
|
|
|
585
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
601
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
586
602
|
}
|
|
587
603
|
}
|
|
588
604
|
},
|
|
@@ -617,10 +633,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
617
633
|
if (this.hourFormat === '12') {
|
|
618
634
|
this.pm = currentHour > 11;
|
|
619
635
|
|
|
620
|
-
if (currentHour >= 12)
|
|
621
|
-
|
|
622
|
-
else
|
|
623
|
-
currentHour = (currentHour == 0) ? 12 : currentHour;
|
|
636
|
+
if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
|
|
637
|
+
else currentHour = currentHour == 0 ? 12 : currentHour;
|
|
624
638
|
}
|
|
625
639
|
|
|
626
640
|
this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
|
|
@@ -634,6 +648,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
634
648
|
this.overlayVisible = false;
|
|
635
649
|
}
|
|
636
650
|
};
|
|
651
|
+
|
|
637
652
|
document.addEventListener('mousedown', this.outsideClickListener);
|
|
638
653
|
}
|
|
639
654
|
},
|
|
@@ -666,6 +681,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
666
681
|
this.overlayVisible = false;
|
|
667
682
|
}
|
|
668
683
|
};
|
|
684
|
+
|
|
669
685
|
window.addEventListener('resize', this.resizeListener);
|
|
670
686
|
}
|
|
671
687
|
},
|
|
@@ -676,27 +692,27 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
676
692
|
}
|
|
677
693
|
},
|
|
678
694
|
isOutsideClicked(event) {
|
|
679
|
-
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) ||
|
|
680
|
-
this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
695
|
+
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
681
696
|
},
|
|
682
697
|
isNavIconClicked(event) {
|
|
683
|
-
return (
|
|
684
|
-
|
|
698
|
+
return (
|
|
699
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-prev') ||
|
|
700
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-prev-icon') ||
|
|
701
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-next') ||
|
|
702
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-next-icon')
|
|
703
|
+
);
|
|
685
704
|
},
|
|
686
705
|
alignOverlay() {
|
|
687
706
|
if (this.touchUI) {
|
|
688
707
|
this.enableModality();
|
|
689
|
-
}
|
|
690
|
-
else if (this.overlay) {
|
|
708
|
+
} else if (this.overlay) {
|
|
691
709
|
if (this.appendTo === 'self' || this.inline) {
|
|
692
710
|
utils.DomHandler.relativePosition(this.overlay, this.$el);
|
|
693
|
-
}
|
|
694
|
-
else {
|
|
711
|
+
} else {
|
|
695
712
|
if (this.view === 'date') {
|
|
696
713
|
this.overlay.style.width = utils.DomHandler.getOuterWidth(this.overlay) + 'px';
|
|
697
714
|
this.overlay.style.minWidth = utils.DomHandler.getOuterWidth(this.$el) + 'px';
|
|
698
|
-
}
|
|
699
|
-
else {
|
|
715
|
+
} else {
|
|
700
716
|
this.overlay.style.width = utils.DomHandler.getOuterWidth(this.$el) + 'px';
|
|
701
717
|
}
|
|
702
718
|
|
|
@@ -709,8 +725,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
709
725
|
if (!this.overlayVisible) {
|
|
710
726
|
this.input.focus();
|
|
711
727
|
this.overlayVisible = true;
|
|
712
|
-
}
|
|
713
|
-
else {
|
|
728
|
+
} else {
|
|
714
729
|
this.overlayVisible = false;
|
|
715
730
|
}
|
|
716
731
|
}
|
|
@@ -730,41 +745,42 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
730
745
|
if (this.disabledDays) {
|
|
731
746
|
let weekday = new Date(year, month, day);
|
|
732
747
|
let weekdayNumber = weekday.getDay();
|
|
748
|
+
|
|
733
749
|
return this.disabledDays.indexOf(weekdayNumber) !== -1;
|
|
734
750
|
}
|
|
751
|
+
|
|
735
752
|
return false;
|
|
736
753
|
},
|
|
737
754
|
onMonthDropdownChange(value) {
|
|
738
755
|
this.currentMonth = parseInt(value);
|
|
739
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
756
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
740
757
|
},
|
|
741
758
|
onYearDropdownChange(value) {
|
|
742
759
|
this.currentYear = parseInt(value);
|
|
743
|
-
this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
760
|
+
this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
744
761
|
},
|
|
745
762
|
onDateSelect(event, dateMeta) {
|
|
746
763
|
if (this.disabled || !dateMeta.selectable) {
|
|
747
764
|
return;
|
|
748
765
|
}
|
|
749
766
|
|
|
750
|
-
utils.DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(cell => cell.tabIndex = -1);
|
|
767
|
+
utils.DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach((cell) => (cell.tabIndex = -1));
|
|
751
768
|
|
|
752
769
|
if (event) {
|
|
753
770
|
event.currentTarget.focus();
|
|
754
771
|
}
|
|
755
772
|
|
|
756
773
|
if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
|
|
757
|
-
let newValue = this.modelValue.filter(date => !this.isDateEquals(date, dateMeta));
|
|
774
|
+
let newValue = this.modelValue.filter((date) => !this.isDateEquals(date, dateMeta));
|
|
775
|
+
|
|
758
776
|
this.updateModel(newValue);
|
|
759
|
-
}
|
|
760
|
-
else {
|
|
777
|
+
} else {
|
|
761
778
|
if (this.shouldSelectDate(dateMeta)) {
|
|
762
779
|
if (dateMeta.otherMonth) {
|
|
763
780
|
this.currentMonth = dateMeta.month;
|
|
764
781
|
this.currentYear = dateMeta.year;
|
|
765
782
|
this.selectDate(dateMeta);
|
|
766
|
-
}
|
|
767
|
-
else {
|
|
783
|
+
} else {
|
|
768
784
|
this.selectDate(dateMeta);
|
|
769
785
|
}
|
|
770
786
|
}
|
|
@@ -781,10 +797,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
781
797
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
782
798
|
|
|
783
799
|
if (this.showTime) {
|
|
784
|
-
if (this.hourFormat === '12' && this.pm && this.currentHour != 12)
|
|
785
|
-
|
|
786
|
-
else
|
|
787
|
-
date.setHours(this.currentHour);
|
|
800
|
+
if (this.hourFormat === '12' && this.pm && this.currentHour != 12) date.setHours(this.currentHour + 12);
|
|
801
|
+
else date.setHours(this.currentHour);
|
|
788
802
|
|
|
789
803
|
date.setMinutes(this.currentMinute);
|
|
790
804
|
date.setSeconds(this.currentSecond);
|
|
@@ -808,25 +822,22 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
808
822
|
|
|
809
823
|
if (this.isSingleSelection()) {
|
|
810
824
|
modelVal = date;
|
|
811
|
-
}
|
|
812
|
-
else if (this.isMultipleSelection()) {
|
|
825
|
+
} else if (this.isMultipleSelection()) {
|
|
813
826
|
modelVal = this.modelValue ? [...this.modelValue, date] : [date];
|
|
814
|
-
}
|
|
815
|
-
else if (this.isRangeSelection()) {
|
|
827
|
+
} else if (this.isRangeSelection()) {
|
|
816
828
|
if (this.modelValue && this.modelValue.length) {
|
|
817
829
|
let startDate = this.modelValue[0];
|
|
818
830
|
let endDate = this.modelValue[1];
|
|
819
831
|
|
|
820
832
|
if (!endDate && date.getTime() >= startDate.getTime()) {
|
|
821
833
|
endDate = date;
|
|
822
|
-
}
|
|
823
|
-
else {
|
|
834
|
+
} else {
|
|
824
835
|
startDate = date;
|
|
825
836
|
endDate = null;
|
|
826
837
|
}
|
|
838
|
+
|
|
827
839
|
modelVal = [startDate, endDate];
|
|
828
|
-
}
|
|
829
|
-
else {
|
|
840
|
+
} else {
|
|
830
841
|
modelVal = [date, null];
|
|
831
842
|
}
|
|
832
843
|
}
|
|
@@ -840,16 +851,15 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
840
851
|
this.overlayVisible = false;
|
|
841
852
|
}, 150);
|
|
842
853
|
}
|
|
854
|
+
|
|
843
855
|
this.$emit('date-select', date);
|
|
844
856
|
},
|
|
845
857
|
updateModel(value) {
|
|
846
858
|
this.$emit('update:modelValue', value);
|
|
847
859
|
},
|
|
848
860
|
shouldSelectDate() {
|
|
849
|
-
if (this.isMultipleSelection())
|
|
850
|
-
|
|
851
|
-
else
|
|
852
|
-
return true;
|
|
861
|
+
if (this.isMultipleSelection()) return this.maxDateCount != null ? this.maxDateCount > (this.modelValue ? this.modelValue.length : 0) : true;
|
|
862
|
+
else return true;
|
|
853
863
|
},
|
|
854
864
|
isSingleSelection() {
|
|
855
865
|
return this.selectionMode === 'single';
|
|
@@ -866,33 +876,34 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
866
876
|
}
|
|
867
877
|
|
|
868
878
|
let formattedValue = '';
|
|
879
|
+
|
|
869
880
|
if (value) {
|
|
870
881
|
try {
|
|
871
882
|
if (this.isSingleSelection()) {
|
|
872
883
|
formattedValue = this.formatDateTime(value);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
for(let i = 0; i < value.length; i++) {
|
|
884
|
+
} else if (this.isMultipleSelection()) {
|
|
885
|
+
for (let i = 0; i < value.length; i++) {
|
|
876
886
|
let dateAsString = this.formatDateTime(value[i]);
|
|
887
|
+
|
|
877
888
|
formattedValue += dateAsString;
|
|
878
|
-
|
|
889
|
+
|
|
890
|
+
if (i !== value.length - 1) {
|
|
879
891
|
formattedValue += ', ';
|
|
880
892
|
}
|
|
881
893
|
}
|
|
882
|
-
}
|
|
883
|
-
else if (this.isRangeSelection()) {
|
|
894
|
+
} else if (this.isRangeSelection()) {
|
|
884
895
|
if (value && value.length) {
|
|
885
896
|
let startDate = value[0];
|
|
886
897
|
let endDate = value[1];
|
|
887
898
|
|
|
888
899
|
formattedValue = this.formatDateTime(startDate);
|
|
900
|
+
|
|
889
901
|
if (endDate) {
|
|
890
902
|
formattedValue += ' - ' + this.formatDateTime(endDate);
|
|
891
903
|
}
|
|
892
904
|
}
|
|
893
905
|
}
|
|
894
|
-
}
|
|
895
|
-
catch(err) {
|
|
906
|
+
} catch (err) {
|
|
896
907
|
formattedValue = value;
|
|
897
908
|
}
|
|
898
909
|
}
|
|
@@ -901,13 +912,14 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
901
912
|
},
|
|
902
913
|
formatDateTime(date) {
|
|
903
914
|
let formattedValue = null;
|
|
915
|
+
|
|
904
916
|
if (date) {
|
|
905
|
-
if(this.timeOnly) {
|
|
917
|
+
if (this.timeOnly) {
|
|
906
918
|
formattedValue = this.formatTime(date);
|
|
907
|
-
}
|
|
908
|
-
else {
|
|
919
|
+
} else {
|
|
909
920
|
formattedValue = this.formatDate(date, this.datePattern);
|
|
910
|
-
|
|
921
|
+
|
|
922
|
+
if (this.showTime) {
|
|
911
923
|
formattedValue += ' ' + this.formatTime(date);
|
|
912
924
|
}
|
|
913
925
|
}
|
|
@@ -921,32 +933,38 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
921
933
|
}
|
|
922
934
|
|
|
923
935
|
let iFormat;
|
|
936
|
+
|
|
924
937
|
const lookAhead = (match) => {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
938
|
+
const matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
|
|
939
|
+
|
|
940
|
+
if (matches) {
|
|
941
|
+
iFormat++;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
return matches;
|
|
945
|
+
},
|
|
931
946
|
formatNumber = (match, value, len) => {
|
|
932
947
|
let num = '' + value;
|
|
948
|
+
|
|
933
949
|
if (lookAhead(match)) {
|
|
934
950
|
while (num.length < len) {
|
|
935
951
|
num = '0' + num;
|
|
936
952
|
}
|
|
937
953
|
}
|
|
954
|
+
|
|
938
955
|
return num;
|
|
939
956
|
},
|
|
940
957
|
formatName = (match, value, shortNames, longNames) => {
|
|
941
|
-
return
|
|
958
|
+
return lookAhead(match) ? longNames[value] : shortNames[value];
|
|
942
959
|
};
|
|
960
|
+
|
|
943
961
|
let output = '';
|
|
944
962
|
let literal = false;
|
|
945
963
|
|
|
946
964
|
if (date) {
|
|
947
965
|
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
|
948
966
|
if (literal) {
|
|
949
|
-
if (format.charAt(iFormat) === '
|
|
967
|
+
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
|
950
968
|
literal = false;
|
|
951
969
|
} else {
|
|
952
970
|
output += format.charAt(iFormat);
|
|
@@ -960,16 +978,13 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
960
978
|
output += formatName('D', date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
|
|
961
979
|
break;
|
|
962
980
|
case 'o':
|
|
963
|
-
output += formatNumber('o',
|
|
964
|
-
Math.round((
|
|
965
|
-
new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() -
|
|
966
|
-
new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
|
981
|
+
output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
|
967
982
|
break;
|
|
968
983
|
case 'm':
|
|
969
984
|
output += formatNumber('m', date.getMonth() + 1, 2);
|
|
970
985
|
break;
|
|
971
986
|
case 'M':
|
|
972
|
-
output += formatName('M',date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
987
|
+
output += formatName('M', date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
973
988
|
break;
|
|
974
989
|
case 'y':
|
|
975
990
|
output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);
|
|
@@ -980,12 +995,13 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
980
995
|
case '!':
|
|
981
996
|
output += date.getTime() * 10000 + this.ticksTo1970;
|
|
982
997
|
break;
|
|
983
|
-
case '
|
|
984
|
-
if (lookAhead('
|
|
985
|
-
output += '
|
|
998
|
+
case "'":
|
|
999
|
+
if (lookAhead("'")) {
|
|
1000
|
+
output += "'";
|
|
986
1001
|
} else {
|
|
987
1002
|
literal = true;
|
|
988
1003
|
}
|
|
1004
|
+
|
|
989
1005
|
break;
|
|
990
1006
|
default:
|
|
991
1007
|
output += format.charAt(iFormat);
|
|
@@ -993,6 +1009,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
993
1009
|
}
|
|
994
1010
|
}
|
|
995
1011
|
}
|
|
1012
|
+
|
|
996
1013
|
return output;
|
|
997
1014
|
},
|
|
998
1015
|
formatTime(date) {
|
|
@@ -1010,21 +1027,21 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1010
1027
|
}
|
|
1011
1028
|
|
|
1012
1029
|
if (this.hourFormat === '12') {
|
|
1013
|
-
output += hours === 0 ? 12 :
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
output += (hours < 10) ? '0' + hours : hours;
|
|
1030
|
+
output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;
|
|
1031
|
+
} else {
|
|
1032
|
+
output += hours < 10 ? '0' + hours : hours;
|
|
1017
1033
|
}
|
|
1034
|
+
|
|
1018
1035
|
output += ':';
|
|
1019
|
-
output +=
|
|
1036
|
+
output += minutes < 10 ? '0' + minutes : minutes;
|
|
1020
1037
|
|
|
1021
1038
|
if (this.showSeconds) {
|
|
1022
1039
|
output += ':';
|
|
1023
|
-
output +=
|
|
1040
|
+
output += seconds < 10 ? '0' + seconds : seconds;
|
|
1024
1041
|
}
|
|
1025
1042
|
|
|
1026
1043
|
if (this.hourFormat === '12') {
|
|
1027
|
-
output += date.getHours() > 11 ?
|
|
1044
|
+
output += date.getHours() > 11 ? ` ${this.$primevue.config.locale.pm}` : ` ${this.$primevue.config.locale.am}`;
|
|
1028
1045
|
}
|
|
1029
1046
|
|
|
1030
1047
|
return output;
|
|
@@ -1067,44 +1084,39 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1067
1084
|
this.clearTimePickerTimer();
|
|
1068
1085
|
},
|
|
1069
1086
|
repeat(event, interval, type, direction) {
|
|
1070
|
-
let i = interval||500;
|
|
1087
|
+
let i = interval || 500;
|
|
1071
1088
|
|
|
1072
1089
|
this.clearTimePickerTimer();
|
|
1073
1090
|
this.timePickerTimer = setTimeout(() => {
|
|
1074
1091
|
this.repeat(event, 100, type, direction);
|
|
1075
1092
|
}, i);
|
|
1076
1093
|
|
|
1077
|
-
switch(type) {
|
|
1094
|
+
switch (type) {
|
|
1078
1095
|
case 0:
|
|
1079
|
-
if (direction === 1)
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
this.decrementHour(event);
|
|
1083
|
-
break;
|
|
1096
|
+
if (direction === 1) this.incrementHour(event);
|
|
1097
|
+
else this.decrementHour(event);
|
|
1098
|
+
break;
|
|
1084
1099
|
|
|
1085
1100
|
case 1:
|
|
1086
|
-
if (direction === 1)
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
this.decrementMinute(event);
|
|
1090
|
-
break;
|
|
1101
|
+
if (direction === 1) this.incrementMinute(event);
|
|
1102
|
+
else this.decrementMinute(event);
|
|
1103
|
+
break;
|
|
1091
1104
|
|
|
1092
1105
|
case 2:
|
|
1093
|
-
if (direction === 1)
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
this.decrementSecond(event);
|
|
1097
|
-
break;
|
|
1106
|
+
if (direction === 1) this.incrementSecond(event);
|
|
1107
|
+
else this.decrementSecond(event);
|
|
1108
|
+
break;
|
|
1098
1109
|
}
|
|
1099
1110
|
},
|
|
1100
1111
|
convertTo24Hour(hours, pm) {
|
|
1101
1112
|
if (this.hourFormat == '12') {
|
|
1102
1113
|
if (hours === 12) {
|
|
1103
|
-
return
|
|
1114
|
+
return pm ? 12 : 0;
|
|
1104
1115
|
} else {
|
|
1105
|
-
return
|
|
1116
|
+
return pm ? hours + 12 : hours;
|
|
1106
1117
|
}
|
|
1107
1118
|
}
|
|
1119
|
+
|
|
1108
1120
|
return hours;
|
|
1109
1121
|
},
|
|
1110
1122
|
validateTime(hour, minute, second, pm) {
|
|
@@ -1114,18 +1126,23 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1114
1126
|
if (this.isRangeSelection()) {
|
|
1115
1127
|
value = this.modelValue[1] || this.modelValue[0];
|
|
1116
1128
|
}
|
|
1129
|
+
|
|
1117
1130
|
if (this.isMultipleSelection()) {
|
|
1118
1131
|
value = this.modelValue[this.modelValue.length - 1];
|
|
1119
1132
|
}
|
|
1133
|
+
|
|
1120
1134
|
const valueDateString = value ? value.toDateString() : null;
|
|
1135
|
+
|
|
1121
1136
|
if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) {
|
|
1122
1137
|
if (this.minDate.getHours() > convertedHour) {
|
|
1123
1138
|
return false;
|
|
1124
1139
|
}
|
|
1140
|
+
|
|
1125
1141
|
if (this.minDate.getHours() === convertedHour) {
|
|
1126
1142
|
if (this.minDate.getMinutes() > minute) {
|
|
1127
1143
|
return false;
|
|
1128
1144
|
}
|
|
1145
|
+
|
|
1129
1146
|
if (this.minDate.getMinutes() === minute) {
|
|
1130
1147
|
if (this.minDate.getSeconds() > second) {
|
|
1131
1148
|
return false;
|
|
@@ -1138,10 +1155,12 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1138
1155
|
if (this.maxDate.getHours() < convertedHour) {
|
|
1139
1156
|
return false;
|
|
1140
1157
|
}
|
|
1158
|
+
|
|
1141
1159
|
if (this.maxDate.getHours() === convertedHour) {
|
|
1142
1160
|
if (this.maxDate.getMinutes() < minute) {
|
|
1143
1161
|
return false;
|
|
1144
1162
|
}
|
|
1163
|
+
|
|
1145
1164
|
if (this.maxDate.getMinutes() === minute) {
|
|
1146
1165
|
if (this.maxDate.getSeconds() < second) {
|
|
1147
1166
|
return false;
|
|
@@ -1149,6 +1168,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1149
1168
|
}
|
|
1150
1169
|
}
|
|
1151
1170
|
}
|
|
1171
|
+
|
|
1152
1172
|
return true;
|
|
1153
1173
|
},
|
|
1154
1174
|
incrementHour(event) {
|
|
@@ -1156,51 +1176,58 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1156
1176
|
let newHour = this.currentHour + this.stepHour;
|
|
1157
1177
|
let newPM = this.pm;
|
|
1158
1178
|
|
|
1159
|
-
if (this.hourFormat == '24')
|
|
1160
|
-
newHour = (newHour >= 24) ? (newHour - 24) : newHour;
|
|
1179
|
+
if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour;
|
|
1161
1180
|
else if (this.hourFormat == '12') {
|
|
1162
1181
|
// Before the AM/PM break, now after
|
|
1163
1182
|
if (prevHour < 12 && newHour > 11) {
|
|
1164
|
-
newPM= !this.pm;
|
|
1183
|
+
newPM = !this.pm;
|
|
1165
1184
|
}
|
|
1166
|
-
|
|
1185
|
+
|
|
1186
|
+
newHour = newHour >= 13 ? newHour - 12 : newHour;
|
|
1167
1187
|
}
|
|
1168
1188
|
|
|
1169
1189
|
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
|
|
1170
1190
|
this.currentHour = newHour;
|
|
1171
1191
|
this.pm = newPM;
|
|
1172
1192
|
}
|
|
1193
|
+
|
|
1173
1194
|
event.preventDefault();
|
|
1174
1195
|
},
|
|
1175
1196
|
decrementHour(event) {
|
|
1176
1197
|
let newHour = this.currentHour - this.stepHour;
|
|
1177
1198
|
let newPM = this.pm;
|
|
1178
1199
|
|
|
1179
|
-
if (this.hourFormat == '24')
|
|
1180
|
-
newHour = (newHour < 0) ? (24 + newHour) : newHour;
|
|
1200
|
+
if (this.hourFormat == '24') newHour = newHour < 0 ? 24 + newHour : newHour;
|
|
1181
1201
|
else if (this.hourFormat == '12') {
|
|
1182
1202
|
// If we were at noon/midnight, then switch
|
|
1183
1203
|
if (this.currentHour === 12) {
|
|
1184
1204
|
newPM = !this.pm;
|
|
1185
1205
|
}
|
|
1186
|
-
|
|
1206
|
+
|
|
1207
|
+
newHour = newHour <= 0 ? 12 + newHour : newHour;
|
|
1187
1208
|
}
|
|
1209
|
+
|
|
1188
1210
|
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
|
|
1189
1211
|
this.currentHour = newHour;
|
|
1190
1212
|
this.pm = newPM;
|
|
1191
1213
|
}
|
|
1214
|
+
|
|
1192
1215
|
event.preventDefault();
|
|
1193
1216
|
},
|
|
1194
1217
|
incrementMinute(event) {
|
|
1195
1218
|
let newMinute = this.currentMinute + this.stepMinute;
|
|
1219
|
+
|
|
1196
1220
|
if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
|
|
1197
|
-
this.currentMinute =
|
|
1221
|
+
this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute;
|
|
1198
1222
|
}
|
|
1223
|
+
|
|
1199
1224
|
event.preventDefault();
|
|
1200
1225
|
},
|
|
1201
1226
|
decrementMinute(event) {
|
|
1202
1227
|
let newMinute = this.currentMinute - this.stepMinute;
|
|
1203
|
-
|
|
1228
|
+
|
|
1229
|
+
newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
|
|
1230
|
+
|
|
1204
1231
|
if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
|
|
1205
1232
|
this.currentMinute = newMinute;
|
|
1206
1233
|
}
|
|
@@ -1209,15 +1236,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1209
1236
|
},
|
|
1210
1237
|
incrementSecond(event) {
|
|
1211
1238
|
let newSecond = this.currentSecond + this.stepSecond;
|
|
1239
|
+
|
|
1212
1240
|
if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
|
|
1213
|
-
this.currentSecond =
|
|
1241
|
+
this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond;
|
|
1214
1242
|
}
|
|
1215
1243
|
|
|
1216
1244
|
event.preventDefault();
|
|
1217
1245
|
},
|
|
1218
1246
|
decrementSecond(event) {
|
|
1219
1247
|
let newSecond = this.currentSecond - this.stepSecond;
|
|
1220
|
-
|
|
1248
|
+
|
|
1249
|
+
newSecond = newSecond < 0 ? 60 + newSecond : newSecond;
|
|
1250
|
+
|
|
1221
1251
|
if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
|
|
1222
1252
|
this.currentSecond = newSecond;
|
|
1223
1253
|
}
|
|
@@ -1231,18 +1261,17 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1231
1261
|
if (this.isRangeSelection()) {
|
|
1232
1262
|
value = this.modelValue[1] || this.modelValue[0];
|
|
1233
1263
|
}
|
|
1264
|
+
|
|
1234
1265
|
if (this.isMultipleSelection()) {
|
|
1235
1266
|
value = this.modelValue[this.modelValue.length - 1];
|
|
1236
1267
|
}
|
|
1268
|
+
|
|
1237
1269
|
value = value ? new Date(value.getTime()) : new Date();
|
|
1238
1270
|
|
|
1239
1271
|
if (this.hourFormat == '12') {
|
|
1240
|
-
if (this.currentHour === 12)
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
|
|
1244
|
-
}
|
|
1245
|
-
else {
|
|
1272
|
+
if (this.currentHour === 12) value.setHours(this.pm ? 12 : 0);
|
|
1273
|
+
else value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
|
|
1274
|
+
} else {
|
|
1246
1275
|
value.setHours(this.currentHour);
|
|
1247
1276
|
}
|
|
1248
1277
|
|
|
@@ -1250,19 +1279,17 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1250
1279
|
value.setSeconds(this.currentSecond);
|
|
1251
1280
|
|
|
1252
1281
|
if (this.isRangeSelection()) {
|
|
1253
|
-
if (this.modelValue[1])
|
|
1254
|
-
|
|
1255
|
-
else
|
|
1256
|
-
value = [value, null];
|
|
1282
|
+
if (this.modelValue[1]) value = [this.modelValue[0], value];
|
|
1283
|
+
else value = [value, null];
|
|
1257
1284
|
}
|
|
1258
1285
|
|
|
1259
|
-
if (this.isMultipleSelection()){
|
|
1286
|
+
if (this.isMultipleSelection()) {
|
|
1260
1287
|
value = [...this.modelValue.slice(0, -1), value];
|
|
1261
1288
|
}
|
|
1262
1289
|
|
|
1263
1290
|
this.updateModel(value);
|
|
1264
1291
|
this.$emit('date-select', value);
|
|
1265
|
-
setTimeout(() => this.timePickerChange = false, 0);
|
|
1292
|
+
setTimeout(() => (this.timePickerChange = false), 0);
|
|
1266
1293
|
},
|
|
1267
1294
|
toggleAMPM(event) {
|
|
1268
1295
|
this.pm = !this.pm;
|
|
@@ -1276,24 +1303,22 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1276
1303
|
},
|
|
1277
1304
|
onMonthSelect(event, index) {
|
|
1278
1305
|
if (this.view === 'month') {
|
|
1279
|
-
this.onDateSelect(event, {year: this.currentYear, month: index, day: 1, selectable: true});
|
|
1280
|
-
}
|
|
1281
|
-
else {
|
|
1306
|
+
this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
|
|
1307
|
+
} else {
|
|
1282
1308
|
this.currentMonth = index;
|
|
1283
1309
|
this.currentView = 'date';
|
|
1284
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
1310
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
1285
1311
|
}
|
|
1286
1312
|
|
|
1287
1313
|
setTimeout(this.updateFocus, 0);
|
|
1288
1314
|
},
|
|
1289
1315
|
onYearSelect(event, year) {
|
|
1290
1316
|
if (this.view === 'year') {
|
|
1291
|
-
this.onDateSelect(event, {year: year, month: 0, day: 1, selectable: true});
|
|
1292
|
-
}
|
|
1293
|
-
else {
|
|
1317
|
+
this.onDateSelect(event, { year: year, month: 0, day: 1, selectable: true });
|
|
1318
|
+
} else {
|
|
1294
1319
|
this.currentYear = year;
|
|
1295
1320
|
this.currentView = 'month';
|
|
1296
|
-
this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
1321
|
+
this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
1297
1322
|
}
|
|
1298
1323
|
|
|
1299
1324
|
setTimeout(this.updateFocus, 0);
|
|
@@ -1307,6 +1332,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1307
1332
|
this.maskClickListener = () => {
|
|
1308
1333
|
this.overlayVisible = false;
|
|
1309
1334
|
};
|
|
1335
|
+
|
|
1310
1336
|
this.mask.addEventListener('click', this.maskClickListener);
|
|
1311
1337
|
|
|
1312
1338
|
document.body.appendChild(this.mask);
|
|
@@ -1329,9 +1355,11 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1329
1355
|
|
|
1330
1356
|
let bodyChildren = document.body.children;
|
|
1331
1357
|
let hasBlockerMasks;
|
|
1358
|
+
|
|
1332
1359
|
for (let i = 0; i < bodyChildren.length; i++) {
|
|
1333
1360
|
let bodyChild = bodyChildren[i];
|
|
1334
|
-
|
|
1361
|
+
|
|
1362
|
+
if (utils.DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {
|
|
1335
1363
|
hasBlockerMasks = true;
|
|
1336
1364
|
break;
|
|
1337
1365
|
}
|
|
@@ -1343,6 +1371,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1343
1371
|
},
|
|
1344
1372
|
updateCurrentMetaData() {
|
|
1345
1373
|
const viewDate = this.viewDate;
|
|
1374
|
+
|
|
1346
1375
|
this.currentMonth = viewDate.getMonth();
|
|
1347
1376
|
this.currentYear = viewDate.getFullYear();
|
|
1348
1377
|
|
|
@@ -1356,15 +1385,17 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1356
1385
|
}
|
|
1357
1386
|
|
|
1358
1387
|
let isValid = true;
|
|
1388
|
+
|
|
1359
1389
|
if (this.isSingleSelection()) {
|
|
1360
1390
|
if (!this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false)) {
|
|
1361
1391
|
isValid = false;
|
|
1362
1392
|
}
|
|
1363
|
-
} else if (value.every(v => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
|
|
1393
|
+
} else if (value.every((v) => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
|
|
1364
1394
|
if (this.isRangeSelection()) {
|
|
1365
1395
|
isValid = value.length > 1 && value[1] > value[0] ? true : false;
|
|
1366
1396
|
}
|
|
1367
1397
|
}
|
|
1398
|
+
|
|
1368
1399
|
return isValid;
|
|
1369
1400
|
},
|
|
1370
1401
|
parseValue(text) {
|
|
@@ -1376,17 +1407,19 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1376
1407
|
|
|
1377
1408
|
if (this.isSingleSelection()) {
|
|
1378
1409
|
value = this.parseDateTime(text);
|
|
1379
|
-
}
|
|
1380
|
-
else if (this.isMultipleSelection()) {
|
|
1410
|
+
} else if (this.isMultipleSelection()) {
|
|
1381
1411
|
let tokens = text.split(',');
|
|
1412
|
+
|
|
1382
1413
|
value = [];
|
|
1414
|
+
|
|
1383
1415
|
for (let token of tokens) {
|
|
1384
1416
|
value.push(this.parseDateTime(token.trim()));
|
|
1385
1417
|
}
|
|
1386
|
-
}
|
|
1387
|
-
else if (this.isRangeSelection()) {
|
|
1418
|
+
} else if (this.isRangeSelection()) {
|
|
1388
1419
|
let tokens = text.split(' - ');
|
|
1420
|
+
|
|
1389
1421
|
value = [];
|
|
1422
|
+
|
|
1390
1423
|
for (let i = 0; i < tokens.length; i++) {
|
|
1391
1424
|
value[i] = this.parseDateTime(tokens[i].trim());
|
|
1392
1425
|
}
|
|
@@ -1401,14 +1434,13 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1401
1434
|
if (this.timeOnly) {
|
|
1402
1435
|
date = new Date();
|
|
1403
1436
|
this.populateTime(date, parts[0], parts[1]);
|
|
1404
|
-
}
|
|
1405
|
-
else {
|
|
1437
|
+
} else {
|
|
1406
1438
|
const dateFormat = this.datePattern;
|
|
1439
|
+
|
|
1407
1440
|
if (this.showTime) {
|
|
1408
1441
|
date = this.parseDate(parts[0], dateFormat);
|
|
1409
1442
|
this.populateTime(date, parts[1], parts[2]);
|
|
1410
|
-
}
|
|
1411
|
-
else {
|
|
1443
|
+
} else {
|
|
1412
1444
|
date = this.parseDate(text, dateFormat);
|
|
1413
1445
|
}
|
|
1414
1446
|
}
|
|
@@ -1420,8 +1452,10 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1420
1452
|
throw 'Invalid Time';
|
|
1421
1453
|
}
|
|
1422
1454
|
|
|
1423
|
-
|
|
1455
|
+
//DEBUG: 2952
|
|
1456
|
+
this.pm = ampm === this.$primevue.config.locale.am || ampm === this.$primevue.config.locale.am.toLowerCase();
|
|
1424
1457
|
let time = this.parseTime(timeString);
|
|
1458
|
+
|
|
1425
1459
|
value.setHours(time.hour);
|
|
1426
1460
|
value.setMinutes(time.minute);
|
|
1427
1461
|
value.setSeconds(time.second);
|
|
@@ -1429,10 +1463,10 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1429
1463
|
parseTime(value) {
|
|
1430
1464
|
let tokens = value.split(':');
|
|
1431
1465
|
let validTokenLength = this.showSeconds ? 3 : 2;
|
|
1432
|
-
let regex =
|
|
1466
|
+
let regex = /^[0-9][0-9]$/;
|
|
1433
1467
|
|
|
1434
1468
|
if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || (this.showSeconds && !tokens[2].match(regex))) {
|
|
1435
|
-
throw
|
|
1469
|
+
throw 'Invalid time';
|
|
1436
1470
|
}
|
|
1437
1471
|
|
|
1438
1472
|
let h = parseInt(tokens[0]);
|
|
@@ -1440,88 +1474,97 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1440
1474
|
let s = this.showSeconds ? parseInt(tokens[2]) : null;
|
|
1441
1475
|
|
|
1442
1476
|
if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat == '12' && h > 12) || (this.showSeconds && (isNaN(s) || s > 59))) {
|
|
1443
|
-
throw
|
|
1444
|
-
}
|
|
1445
|
-
else {
|
|
1477
|
+
throw 'Invalid time';
|
|
1478
|
+
} else {
|
|
1446
1479
|
if (this.hourFormat == '12' && h !== 12 && this.pm) {
|
|
1447
|
-
h+= 12;
|
|
1480
|
+
h += 12;
|
|
1448
1481
|
}
|
|
1449
1482
|
|
|
1450
|
-
return {hour: h, minute: m, second: s};
|
|
1483
|
+
return { hour: h, minute: m, second: s };
|
|
1451
1484
|
}
|
|
1452
1485
|
},
|
|
1453
1486
|
parseDate(value, format) {
|
|
1454
1487
|
if (format == null || value == null) {
|
|
1455
|
-
throw
|
|
1488
|
+
throw 'Invalid arguments';
|
|
1456
1489
|
}
|
|
1457
1490
|
|
|
1458
|
-
value =
|
|
1459
|
-
|
|
1491
|
+
value = typeof value === 'object' ? value.toString() : value + '';
|
|
1492
|
+
|
|
1493
|
+
if (value === '') {
|
|
1460
1494
|
return null;
|
|
1461
1495
|
}
|
|
1462
1496
|
|
|
1463
|
-
let iFormat,
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
iFormat
|
|
1476
|
-
}
|
|
1477
|
-
return matches;
|
|
1478
|
-
},
|
|
1479
|
-
getNumber = (match) => {
|
|
1480
|
-
let isDoubled = lookAhead(match),
|
|
1481
|
-
size = (match === "@" ? 14 : (match === "!" ? 20 :
|
|
1482
|
-
(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
|
|
1483
|
-
minSize = (match === "y" ? size : 1),
|
|
1484
|
-
digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
|
|
1485
|
-
num = value.substring(iValue).match(digits);
|
|
1486
|
-
if (!num) {
|
|
1487
|
-
throw "Missing number at position " + iValue;
|
|
1488
|
-
}
|
|
1489
|
-
iValue += num[ 0 ].length;
|
|
1490
|
-
return parseInt(num[ 0 ], 10);
|
|
1491
|
-
},
|
|
1492
|
-
getName = (match, shortNames, longNames) => {
|
|
1493
|
-
let index = -1;
|
|
1494
|
-
let arr = lookAhead(match) ? longNames : shortNames;
|
|
1495
|
-
let names = [];
|
|
1496
|
-
|
|
1497
|
-
for (let i = 0; i < arr.length; i++) {
|
|
1498
|
-
names.push([i,arr[i]]);
|
|
1499
|
-
}
|
|
1500
|
-
names.sort((a,b) => {
|
|
1501
|
-
return -(a[ 1 ].length - b[ 1 ].length);
|
|
1502
|
-
});
|
|
1497
|
+
let iFormat,
|
|
1498
|
+
dim,
|
|
1499
|
+
extra,
|
|
1500
|
+
iValue = 0,
|
|
1501
|
+
shortYearCutoff = typeof this.shortYearCutoff !== 'string' ? this.shortYearCutoff : (new Date().getFullYear() % 100) + parseInt(this.shortYearCutoff, 10),
|
|
1502
|
+
year = -1,
|
|
1503
|
+
month = -1,
|
|
1504
|
+
day = -1,
|
|
1505
|
+
doy = -1,
|
|
1506
|
+
literal = false,
|
|
1507
|
+
date,
|
|
1508
|
+
lookAhead = (match) => {
|
|
1509
|
+
let matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
|
|
1503
1510
|
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
|
1507
|
-
index = names[i][0];
|
|
1508
|
-
iValue += name.length;
|
|
1509
|
-
break;
|
|
1511
|
+
if (matches) {
|
|
1512
|
+
iFormat++;
|
|
1510
1513
|
}
|
|
1511
|
-
}
|
|
1512
1514
|
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1515
|
+
return matches;
|
|
1516
|
+
},
|
|
1517
|
+
getNumber = (match) => {
|
|
1518
|
+
let isDoubled = lookAhead(match),
|
|
1519
|
+
size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,
|
|
1520
|
+
minSize = match === 'y' ? size : 1,
|
|
1521
|
+
digits = new RegExp('^\\d{' + minSize + ',' + size + '}'),
|
|
1522
|
+
num = value.substring(iValue).match(digits);
|
|
1523
|
+
|
|
1524
|
+
if (!num) {
|
|
1525
|
+
throw 'Missing number at position ' + iValue;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
iValue += num[0].length;
|
|
1529
|
+
|
|
1530
|
+
return parseInt(num[0], 10);
|
|
1531
|
+
},
|
|
1532
|
+
getName = (match, shortNames, longNames) => {
|
|
1533
|
+
let index = -1;
|
|
1534
|
+
let arr = lookAhead(match) ? longNames : shortNames;
|
|
1535
|
+
let names = [];
|
|
1536
|
+
|
|
1537
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1538
|
+
names.push([i, arr[i]]);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
names.sort((a, b) => {
|
|
1542
|
+
return -(a[1].length - b[1].length);
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
for (let i = 0; i < names.length; i++) {
|
|
1546
|
+
let name = names[i][1];
|
|
1547
|
+
|
|
1548
|
+
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
|
1549
|
+
index = names[i][0];
|
|
1550
|
+
iValue += name.length;
|
|
1551
|
+
break;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
if (index !== -1) {
|
|
1556
|
+
return index + 1;
|
|
1557
|
+
} else {
|
|
1558
|
+
throw 'Unknown name at position ' + iValue;
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
checkLiteral = () => {
|
|
1562
|
+
if (value.charAt(iValue) !== format.charAt(iFormat)) {
|
|
1563
|
+
throw 'Unexpected literal at position ' + iValue;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
iValue++;
|
|
1567
|
+
};
|
|
1525
1568
|
|
|
1526
1569
|
if (this.currentView === 'month') {
|
|
1527
1570
|
day = 1;
|
|
@@ -1536,32 +1579,32 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1536
1579
|
}
|
|
1537
1580
|
} else {
|
|
1538
1581
|
switch (format.charAt(iFormat)) {
|
|
1539
|
-
case
|
|
1540
|
-
day = getNumber(
|
|
1582
|
+
case 'd':
|
|
1583
|
+
day = getNumber('d');
|
|
1541
1584
|
break;
|
|
1542
|
-
case
|
|
1543
|
-
getName(
|
|
1585
|
+
case 'D':
|
|
1586
|
+
getName('D', this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
|
|
1544
1587
|
break;
|
|
1545
|
-
case
|
|
1546
|
-
doy = getNumber(
|
|
1588
|
+
case 'o':
|
|
1589
|
+
doy = getNumber('o');
|
|
1547
1590
|
break;
|
|
1548
|
-
case
|
|
1549
|
-
month = getNumber(
|
|
1591
|
+
case 'm':
|
|
1592
|
+
month = getNumber('m');
|
|
1550
1593
|
break;
|
|
1551
|
-
case
|
|
1552
|
-
month = getName(
|
|
1594
|
+
case 'M':
|
|
1595
|
+
month = getName('M', this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
1553
1596
|
break;
|
|
1554
|
-
case
|
|
1555
|
-
year = getNumber(
|
|
1597
|
+
case 'y':
|
|
1598
|
+
year = getNumber('y');
|
|
1556
1599
|
break;
|
|
1557
|
-
case
|
|
1558
|
-
date = new Date(getNumber(
|
|
1600
|
+
case '@':
|
|
1601
|
+
date = new Date(getNumber('@'));
|
|
1559
1602
|
year = date.getFullYear();
|
|
1560
1603
|
month = date.getMonth() + 1;
|
|
1561
1604
|
day = date.getDate();
|
|
1562
1605
|
break;
|
|
1563
|
-
case
|
|
1564
|
-
date = new Date((getNumber(
|
|
1606
|
+
case '!':
|
|
1607
|
+
date = new Date((getNumber('!') - this.ticksTo1970) / 10000);
|
|
1565
1608
|
year = date.getFullYear();
|
|
1566
1609
|
month = date.getMonth() + 1;
|
|
1567
1610
|
day = date.getDate();
|
|
@@ -1572,6 +1615,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1572
1615
|
} else {
|
|
1573
1616
|
literal = true;
|
|
1574
1617
|
}
|
|
1618
|
+
|
|
1575
1619
|
break;
|
|
1576
1620
|
default:
|
|
1577
1621
|
checkLiteral();
|
|
@@ -1581,95 +1625,124 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1581
1625
|
|
|
1582
1626
|
if (iValue < value.length) {
|
|
1583
1627
|
extra = value.substr(iValue);
|
|
1628
|
+
|
|
1584
1629
|
if (!/^\s+/.test(extra)) {
|
|
1585
|
-
throw
|
|
1630
|
+
throw 'Extra/unparsed characters found in date: ' + extra;
|
|
1586
1631
|
}
|
|
1587
1632
|
}
|
|
1588
1633
|
|
|
1589
1634
|
if (year === -1) {
|
|
1590
1635
|
year = new Date().getFullYear();
|
|
1591
1636
|
} else if (year < 100) {
|
|
1592
|
-
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
|
1593
|
-
(year <= shortYearCutoff ? 0 : -100);
|
|
1637
|
+
year += new Date().getFullYear() - (new Date().getFullYear() % 100) + (year <= shortYearCutoff ? 0 : -100);
|
|
1594
1638
|
}
|
|
1595
1639
|
|
|
1596
1640
|
if (doy > -1) {
|
|
1597
1641
|
month = 1;
|
|
1598
1642
|
day = doy;
|
|
1643
|
+
|
|
1599
1644
|
do {
|
|
1600
1645
|
dim = this.getDaysCountInMonth(year, month - 1);
|
|
1646
|
+
|
|
1601
1647
|
if (day <= dim) {
|
|
1602
1648
|
break;
|
|
1603
1649
|
}
|
|
1650
|
+
|
|
1604
1651
|
month++;
|
|
1605
1652
|
day -= dim;
|
|
1606
|
-
|
|
1653
|
+
// eslint-disable-next-line
|
|
1607
1654
|
} while (true);
|
|
1608
1655
|
}
|
|
1609
1656
|
|
|
1610
1657
|
date = this.daylightSavingAdjust(new Date(year, month - 1, day));
|
|
1611
1658
|
|
|
1612
1659
|
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
|
1613
|
-
throw
|
|
1660
|
+
throw 'Invalid date'; // E.g. 31/02/00
|
|
1614
1661
|
}
|
|
1615
1662
|
|
|
1616
1663
|
return date;
|
|
1617
1664
|
},
|
|
1618
1665
|
getWeekNumber(date) {
|
|
1619
1666
|
let checkDate = new Date(date.getTime());
|
|
1620
|
-
|
|
1667
|
+
|
|
1668
|
+
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
|
1621
1669
|
let time = checkDate.getTime();
|
|
1622
|
-
|
|
1623
|
-
checkDate.
|
|
1624
|
-
|
|
1670
|
+
|
|
1671
|
+
checkDate.setMonth(0);
|
|
1672
|
+
checkDate.setDate(1);
|
|
1673
|
+
|
|
1674
|
+
return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;
|
|
1625
1675
|
},
|
|
1626
1676
|
onDateCellKeydown(event, date, groupIndex) {
|
|
1627
1677
|
const cellContent = event.currentTarget;
|
|
1628
1678
|
const cell = cellContent.parentElement;
|
|
1629
1679
|
|
|
1680
|
+
const cellIndex = utils.DomHandler.index(cell);
|
|
1681
|
+
|
|
1630
1682
|
switch (event.code) {
|
|
1631
1683
|
case 'ArrowDown': {
|
|
1632
1684
|
cellContent.tabIndex = '-1';
|
|
1633
|
-
|
|
1685
|
+
|
|
1634
1686
|
let nextRow = cell.parentElement.nextElementSibling;
|
|
1687
|
+
|
|
1635
1688
|
if (nextRow) {
|
|
1636
|
-
let
|
|
1637
|
-
|
|
1638
|
-
|
|
1689
|
+
let tableRowIndex = utils.DomHandler.index(cell.parentElement);
|
|
1690
|
+
const tableRows = Array.from(cell.parentElement.parentElement.children);
|
|
1691
|
+
const nextTableRows = tableRows.slice(tableRowIndex + 1);
|
|
1692
|
+
|
|
1693
|
+
let hasNextFocusableDate = nextTableRows.find((el) => {
|
|
1694
|
+
let focusCell = el.children[cellIndex].children[0];
|
|
1695
|
+
|
|
1696
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1697
|
+
});
|
|
1698
|
+
|
|
1699
|
+
if (hasNextFocusableDate) {
|
|
1700
|
+
let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
|
|
1701
|
+
|
|
1702
|
+
focusCell.tabIndex = '0';
|
|
1703
|
+
focusCell.focus();
|
|
1704
|
+
} else {
|
|
1705
|
+
this.navigationState = { backward: false };
|
|
1639
1706
|
this.navForward(event);
|
|
1640
1707
|
}
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
nextRow.children[cellIndex].children[0].focus();
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
else {
|
|
1647
|
-
this.navigationState = {backward: false};
|
|
1708
|
+
} else {
|
|
1709
|
+
this.navigationState = { backward: false };
|
|
1648
1710
|
this.navForward(event);
|
|
1649
1711
|
}
|
|
1712
|
+
|
|
1650
1713
|
event.preventDefault();
|
|
1651
1714
|
break;
|
|
1652
1715
|
}
|
|
1653
1716
|
|
|
1654
1717
|
case 'ArrowUp': {
|
|
1655
1718
|
cellContent.tabIndex = '-1';
|
|
1656
|
-
let cellIndex = utils.DomHandler.index(cell);
|
|
1657
1719
|
let prevRow = cell.parentElement.previousElementSibling;
|
|
1720
|
+
|
|
1658
1721
|
if (prevRow) {
|
|
1659
|
-
let
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1722
|
+
let tableRowIndex = utils.DomHandler.index(cell.parentElement);
|
|
1723
|
+
const tableRows = Array.from(cell.parentElement.parentElement.children);
|
|
1724
|
+
const prevTableRows = tableRows.slice(0, tableRowIndex).reverse();
|
|
1725
|
+
|
|
1726
|
+
let hasNextFocusableDate = prevTableRows.find((el) => {
|
|
1727
|
+
let focusCell = el.children[cellIndex].children[0];
|
|
1728
|
+
|
|
1729
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1730
|
+
});
|
|
1731
|
+
|
|
1732
|
+
if (hasNextFocusableDate) {
|
|
1733
|
+
let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
|
|
1734
|
+
|
|
1665
1735
|
focusCell.tabIndex = '0';
|
|
1666
1736
|
focusCell.focus();
|
|
1737
|
+
} else {
|
|
1738
|
+
this.navigationState = { backward: true };
|
|
1739
|
+
this.navBackward(event);
|
|
1667
1740
|
}
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
this.navigationState = {backward: true};
|
|
1741
|
+
} else {
|
|
1742
|
+
this.navigationState = { backward: true };
|
|
1671
1743
|
this.navBackward(event);
|
|
1672
1744
|
}
|
|
1745
|
+
|
|
1673
1746
|
event.preventDefault();
|
|
1674
1747
|
break;
|
|
1675
1748
|
}
|
|
@@ -1677,19 +1750,29 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1677
1750
|
case 'ArrowLeft': {
|
|
1678
1751
|
cellContent.tabIndex = '-1';
|
|
1679
1752
|
let prevCell = cell.previousElementSibling;
|
|
1753
|
+
|
|
1680
1754
|
if (prevCell) {
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1755
|
+
const cells = Array.from(cell.parentElement.children);
|
|
1756
|
+
const prevCells = cells.slice(0, cellIndex).reverse();
|
|
1757
|
+
|
|
1758
|
+
let hasNextFocusableDate = prevCells.find((el) => {
|
|
1759
|
+
let focusCell = el.children[0];
|
|
1760
|
+
|
|
1761
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1762
|
+
});
|
|
1763
|
+
|
|
1764
|
+
if (hasNextFocusableDate) {
|
|
1765
|
+
let focusCell = hasNextFocusableDate.children[0];
|
|
1766
|
+
|
|
1686
1767
|
focusCell.tabIndex = '0';
|
|
1687
1768
|
focusCell.focus();
|
|
1769
|
+
} else {
|
|
1770
|
+
this.navigateToMonth(event, true, groupIndex);
|
|
1688
1771
|
}
|
|
1689
|
-
}
|
|
1690
|
-
else {
|
|
1772
|
+
} else {
|
|
1691
1773
|
this.navigateToMonth(event, true, groupIndex);
|
|
1692
1774
|
}
|
|
1775
|
+
|
|
1693
1776
|
event.preventDefault();
|
|
1694
1777
|
break;
|
|
1695
1778
|
}
|
|
@@ -1697,24 +1780,34 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1697
1780
|
case 'ArrowRight': {
|
|
1698
1781
|
cellContent.tabIndex = '-1';
|
|
1699
1782
|
let nextCell = cell.nextElementSibling;
|
|
1783
|
+
|
|
1700
1784
|
if (nextCell) {
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1785
|
+
const cells = Array.from(cell.parentElement.children);
|
|
1786
|
+
const nextCells = cells.slice(cellIndex + 1);
|
|
1787
|
+
let hasNextFocusableDate = nextCells.find((el) => {
|
|
1788
|
+
let focusCell = el.children[0];
|
|
1789
|
+
|
|
1790
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1791
|
+
});
|
|
1792
|
+
|
|
1793
|
+
if (hasNextFocusableDate) {
|
|
1794
|
+
let focusCell = hasNextFocusableDate.children[0];
|
|
1795
|
+
|
|
1706
1796
|
focusCell.tabIndex = '0';
|
|
1707
1797
|
focusCell.focus();
|
|
1798
|
+
} else {
|
|
1799
|
+
this.navigateToMonth(event, false, groupIndex);
|
|
1708
1800
|
}
|
|
1709
|
-
}
|
|
1710
|
-
else {
|
|
1801
|
+
} else {
|
|
1711
1802
|
this.navigateToMonth(event, false, groupIndex);
|
|
1712
1803
|
}
|
|
1804
|
+
|
|
1713
1805
|
event.preventDefault();
|
|
1714
1806
|
break;
|
|
1715
1807
|
}
|
|
1716
1808
|
|
|
1717
1809
|
case 'Enter':
|
|
1810
|
+
|
|
1718
1811
|
case 'Space': {
|
|
1719
1812
|
this.onDateSelect(event, date);
|
|
1720
1813
|
event.preventDefault();
|
|
@@ -1731,6 +1824,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1731
1824
|
if (!this.inline) {
|
|
1732
1825
|
this.trapFocus(event);
|
|
1733
1826
|
}
|
|
1827
|
+
|
|
1734
1828
|
break;
|
|
1735
1829
|
}
|
|
1736
1830
|
|
|
@@ -1738,10 +1832,10 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1738
1832
|
cellContent.tabIndex = '-1';
|
|
1739
1833
|
let currentRow = cell.parentElement;
|
|
1740
1834
|
let focusCell = currentRow.children[0].children[0];
|
|
1835
|
+
|
|
1741
1836
|
if (utils.DomHandler.hasClass(focusCell, 'p-disabled')) {
|
|
1742
1837
|
this.navigateToMonth(event, true, groupIndex);
|
|
1743
|
-
}
|
|
1744
|
-
else {
|
|
1838
|
+
} else {
|
|
1745
1839
|
focusCell.tabIndex = '0';
|
|
1746
1840
|
focusCell.focus();
|
|
1747
1841
|
}
|
|
@@ -1753,11 +1847,11 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1753
1847
|
case 'End': {
|
|
1754
1848
|
cellContent.tabIndex = '-1';
|
|
1755
1849
|
let currentRow = cell.parentElement;
|
|
1756
|
-
let focusCell = currentRow.children[currentRow.children.length -1].children[0];
|
|
1850
|
+
let focusCell = currentRow.children[currentRow.children.length - 1].children[0];
|
|
1851
|
+
|
|
1757
1852
|
if (utils.DomHandler.hasClass(focusCell, 'p-disabled')) {
|
|
1758
1853
|
this.navigateToMonth(event, false, groupIndex);
|
|
1759
|
-
}
|
|
1760
|
-
else {
|
|
1854
|
+
} else {
|
|
1761
1855
|
focusCell.tabIndex = '0';
|
|
1762
1856
|
focusCell.focus();
|
|
1763
1857
|
}
|
|
@@ -1769,10 +1863,9 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1769
1863
|
case 'PageUp': {
|
|
1770
1864
|
cellContent.tabIndex = '-1';
|
|
1771
1865
|
if (event.shiftKey) {
|
|
1772
|
-
this.navigationState = {backward: true};
|
|
1866
|
+
this.navigationState = { backward: true };
|
|
1773
1867
|
this.navBackward(event);
|
|
1774
|
-
}
|
|
1775
|
-
else this.navigateToMonth(event, true, groupIndex);
|
|
1868
|
+
} else this.navigateToMonth(event, true, groupIndex);
|
|
1776
1869
|
|
|
1777
1870
|
event.preventDefault();
|
|
1778
1871
|
break;
|
|
@@ -1781,10 +1874,9 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1781
1874
|
case 'PageDown': {
|
|
1782
1875
|
cellContent.tabIndex = '-1';
|
|
1783
1876
|
if (event.shiftKey) {
|
|
1784
|
-
this.navigationState = {backward: false};
|
|
1877
|
+
this.navigationState = { backward: false };
|
|
1785
1878
|
this.navForward(event);
|
|
1786
|
-
}
|
|
1787
|
-
else this.navigateToMonth(event, false, groupIndex);
|
|
1879
|
+
} else this.navigateToMonth(event, false, groupIndex);
|
|
1788
1880
|
|
|
1789
1881
|
event.preventDefault();
|
|
1790
1882
|
break;
|
|
@@ -1793,26 +1885,25 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1793
1885
|
},
|
|
1794
1886
|
navigateToMonth(event, prev, groupIndex) {
|
|
1795
1887
|
if (prev) {
|
|
1796
|
-
if (this.numberOfMonths === 1 ||
|
|
1797
|
-
this.navigationState = {backward: true};
|
|
1888
|
+
if (this.numberOfMonths === 1 || groupIndex === 0) {
|
|
1889
|
+
this.navigationState = { backward: true };
|
|
1798
1890
|
this.navBackward(event);
|
|
1799
|
-
}
|
|
1800
|
-
else {
|
|
1891
|
+
} else {
|
|
1801
1892
|
let prevMonthContainer = this.overlay.children[groupIndex - 1];
|
|
1802
1893
|
let cells = utils.DomHandler.find(prevMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
1803
1894
|
let focusCell = cells[cells.length - 1];
|
|
1895
|
+
|
|
1804
1896
|
focusCell.tabIndex = '0';
|
|
1805
1897
|
focusCell.focus();
|
|
1806
1898
|
}
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
this.navigationState = {backward: false};
|
|
1899
|
+
} else {
|
|
1900
|
+
if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) {
|
|
1901
|
+
this.navigationState = { backward: false };
|
|
1811
1902
|
this.navForward(event);
|
|
1812
|
-
}
|
|
1813
|
-
else {
|
|
1903
|
+
} else {
|
|
1814
1904
|
let nextMonthContainer = this.overlay.children[groupIndex + 1];
|
|
1815
1905
|
let focusCell = utils.DomHandler.findSingle(nextMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
1906
|
+
|
|
1816
1907
|
focusCell.tabIndex = '0';
|
|
1817
1908
|
focusCell.focus();
|
|
1818
1909
|
}
|
|
@@ -1823,15 +1914,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1823
1914
|
|
|
1824
1915
|
switch (event.code) {
|
|
1825
1916
|
case 'ArrowUp':
|
|
1917
|
+
|
|
1826
1918
|
case 'ArrowDown': {
|
|
1827
1919
|
cell.tabIndex = '-1';
|
|
1828
1920
|
var cells = cell.parentElement.children;
|
|
1829
1921
|
var cellIndex = utils.DomHandler.index(cell);
|
|
1830
|
-
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex -3];
|
|
1922
|
+
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex - 3];
|
|
1923
|
+
|
|
1831
1924
|
if (nextCell) {
|
|
1832
1925
|
nextCell.tabIndex = '0';
|
|
1833
1926
|
nextCell.focus();
|
|
1834
1927
|
}
|
|
1928
|
+
|
|
1835
1929
|
event.preventDefault();
|
|
1836
1930
|
break;
|
|
1837
1931
|
}
|
|
@@ -1839,14 +1933,15 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1839
1933
|
case 'ArrowLeft': {
|
|
1840
1934
|
cell.tabIndex = '-1';
|
|
1841
1935
|
let prevCell = cell.previousElementSibling;
|
|
1936
|
+
|
|
1842
1937
|
if (prevCell) {
|
|
1843
1938
|
prevCell.tabIndex = '0';
|
|
1844
1939
|
prevCell.focus();
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
this.navigationState = {backward: true};
|
|
1940
|
+
} else {
|
|
1941
|
+
this.navigationState = { backward: true };
|
|
1848
1942
|
this.navBackward(event);
|
|
1849
1943
|
}
|
|
1944
|
+
|
|
1850
1945
|
event.preventDefault();
|
|
1851
1946
|
break;
|
|
1852
1947
|
}
|
|
@@ -1854,21 +1949,22 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1854
1949
|
case 'ArrowRight': {
|
|
1855
1950
|
cell.tabIndex = '-1';
|
|
1856
1951
|
let nextCell = cell.nextElementSibling;
|
|
1952
|
+
|
|
1857
1953
|
if (nextCell) {
|
|
1858
1954
|
nextCell.tabIndex = '0';
|
|
1859
1955
|
nextCell.focus();
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
this.navigationState = {backward: false};
|
|
1956
|
+
} else {
|
|
1957
|
+
this.navigationState = { backward: false };
|
|
1863
1958
|
this.navForward(event);
|
|
1864
1959
|
}
|
|
1960
|
+
|
|
1865
1961
|
event.preventDefault();
|
|
1866
1962
|
break;
|
|
1867
1963
|
}
|
|
1868
1964
|
|
|
1869
1965
|
case 'PageUp': {
|
|
1870
1966
|
if (event.shiftKey) return;
|
|
1871
|
-
this.navigationState = {backward: true};
|
|
1967
|
+
this.navigationState = { backward: true };
|
|
1872
1968
|
this.navBackward(event);
|
|
1873
1969
|
|
|
1874
1970
|
break;
|
|
@@ -1876,13 +1972,14 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1876
1972
|
|
|
1877
1973
|
case 'PageDown': {
|
|
1878
1974
|
if (event.shiftKey) return;
|
|
1879
|
-
this.navigationState = {backward: false};
|
|
1975
|
+
this.navigationState = { backward: false };
|
|
1880
1976
|
this.navForward(event);
|
|
1881
1977
|
|
|
1882
1978
|
break;
|
|
1883
1979
|
}
|
|
1884
1980
|
|
|
1885
1981
|
case 'Enter':
|
|
1982
|
+
|
|
1886
1983
|
case 'Space': {
|
|
1887
1984
|
this.onMonthSelect(event, index);
|
|
1888
1985
|
event.preventDefault();
|
|
@@ -1906,15 +2003,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1906
2003
|
|
|
1907
2004
|
switch (event.code) {
|
|
1908
2005
|
case 'ArrowUp':
|
|
1909
|
-
|
|
2006
|
+
|
|
2007
|
+
case 'ArrowDown': {
|
|
1910
2008
|
cell.tabIndex = '-1';
|
|
1911
2009
|
var cells = cell.parentElement.children;
|
|
1912
2010
|
var cellIndex = utils.DomHandler.index(cell);
|
|
1913
2011
|
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 2 : cellIndex - 2];
|
|
2012
|
+
|
|
1914
2013
|
if (nextCell) {
|
|
1915
2014
|
nextCell.tabIndex = '0';
|
|
1916
2015
|
nextCell.focus();
|
|
1917
2016
|
}
|
|
2017
|
+
|
|
1918
2018
|
event.preventDefault();
|
|
1919
2019
|
break;
|
|
1920
2020
|
}
|
|
@@ -1922,14 +2022,15 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1922
2022
|
case 'ArrowLeft': {
|
|
1923
2023
|
cell.tabIndex = '-1';
|
|
1924
2024
|
let prevCell = cell.previousElementSibling;
|
|
2025
|
+
|
|
1925
2026
|
if (prevCell) {
|
|
1926
2027
|
prevCell.tabIndex = '0';
|
|
1927
2028
|
prevCell.focus();
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
this.navigationState = {backward: true};
|
|
2029
|
+
} else {
|
|
2030
|
+
this.navigationState = { backward: true };
|
|
1931
2031
|
this.navBackward(event);
|
|
1932
2032
|
}
|
|
2033
|
+
|
|
1933
2034
|
event.preventDefault();
|
|
1934
2035
|
break;
|
|
1935
2036
|
}
|
|
@@ -1937,21 +2038,22 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1937
2038
|
case 'ArrowRight': {
|
|
1938
2039
|
cell.tabIndex = '-1';
|
|
1939
2040
|
let nextCell = cell.nextElementSibling;
|
|
2041
|
+
|
|
1940
2042
|
if (nextCell) {
|
|
1941
2043
|
nextCell.tabIndex = '0';
|
|
1942
2044
|
nextCell.focus();
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
this.navigationState = {backward: false};
|
|
2045
|
+
} else {
|
|
2046
|
+
this.navigationState = { backward: false };
|
|
1946
2047
|
this.navForward(event);
|
|
1947
2048
|
}
|
|
2049
|
+
|
|
1948
2050
|
event.preventDefault();
|
|
1949
2051
|
break;
|
|
1950
2052
|
}
|
|
1951
2053
|
|
|
1952
2054
|
case 'PageUp': {
|
|
1953
2055
|
if (event.shiftKey) return;
|
|
1954
|
-
this.navigationState = {backward: true};
|
|
2056
|
+
this.navigationState = { backward: true };
|
|
1955
2057
|
this.navBackward(event);
|
|
1956
2058
|
|
|
1957
2059
|
break;
|
|
@@ -1959,13 +2061,14 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1959
2061
|
|
|
1960
2062
|
case 'PageDown': {
|
|
1961
2063
|
if (event.shiftKey) return;
|
|
1962
|
-
this.navigationState = {backward: false};
|
|
2064
|
+
this.navigationState = { backward: false };
|
|
1963
2065
|
this.navForward(event);
|
|
1964
2066
|
|
|
1965
2067
|
break;
|
|
1966
2068
|
}
|
|
1967
2069
|
|
|
1968
2070
|
case 'Enter':
|
|
2071
|
+
|
|
1969
2072
|
case 'Space': {
|
|
1970
2073
|
this.onYearSelect(event, index);
|
|
1971
2074
|
event.preventDefault();
|
|
@@ -1991,37 +2094,29 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
1991
2094
|
if (this.navigationState.button) {
|
|
1992
2095
|
this.initFocusableCell();
|
|
1993
2096
|
|
|
1994
|
-
if (this.navigationState.backward)
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
utils.DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
|
|
1998
|
-
}
|
|
1999
|
-
else {
|
|
2097
|
+
if (this.navigationState.backward) utils.DomHandler.findSingle(this.overlay, '.p-datepicker-prev').focus();
|
|
2098
|
+
else utils.DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
|
|
2099
|
+
} else {
|
|
2000
2100
|
if (this.navigationState.backward) {
|
|
2001
2101
|
let cells;
|
|
2002
2102
|
|
|
2003
2103
|
if (this.currentView === 'month') {
|
|
2004
2104
|
cells = utils.DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
|
|
2005
|
-
}
|
|
2006
|
-
else if (this.currentView === 'year') {
|
|
2105
|
+
} else if (this.currentView === 'year') {
|
|
2007
2106
|
cells = utils.DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
|
|
2008
|
-
}
|
|
2009
|
-
else {
|
|
2107
|
+
} else {
|
|
2010
2108
|
cells = utils.DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
2011
2109
|
}
|
|
2012
2110
|
|
|
2013
2111
|
if (cells && cells.length > 0) {
|
|
2014
2112
|
cell = cells[cells.length - 1];
|
|
2015
2113
|
}
|
|
2016
|
-
}
|
|
2017
|
-
else {
|
|
2114
|
+
} else {
|
|
2018
2115
|
if (this.currentView === 'month') {
|
|
2019
2116
|
cell = utils.DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
|
|
2020
|
-
}
|
|
2021
|
-
else if (this.currentView === 'year') {
|
|
2117
|
+
} else if (this.currentView === 'year') {
|
|
2022
2118
|
cell = utils.DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
|
|
2023
|
-
}
|
|
2024
|
-
else {
|
|
2119
|
+
} else {
|
|
2025
2120
|
cell = utils.DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
2026
2121
|
}
|
|
2027
2122
|
}
|
|
@@ -2033,8 +2128,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2033
2128
|
}
|
|
2034
2129
|
|
|
2035
2130
|
this.navigationState = null;
|
|
2036
|
-
}
|
|
2037
|
-
else {
|
|
2131
|
+
} else {
|
|
2038
2132
|
this.initFocusableCell();
|
|
2039
2133
|
}
|
|
2040
2134
|
},
|
|
@@ -2043,24 +2137,24 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2043
2137
|
|
|
2044
2138
|
if (this.currentView === 'month') {
|
|
2045
2139
|
let cells = utils.DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month');
|
|
2046
|
-
let selectedCell= utils.DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
|
|
2047
|
-
|
|
2140
|
+
let selectedCell = utils.DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
|
|
2141
|
+
|
|
2142
|
+
cells.forEach((cell) => (cell.tabIndex = -1));
|
|
2048
2143
|
cell = selectedCell || cells[0];
|
|
2049
|
-
}
|
|
2050
|
-
else if (this.currentView === 'year') {
|
|
2144
|
+
} else if (this.currentView === 'year') {
|
|
2051
2145
|
let cells = utils.DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year');
|
|
2052
|
-
let selectedCell= utils.DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
|
|
2053
|
-
|
|
2146
|
+
let selectedCell = utils.DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
|
|
2147
|
+
|
|
2148
|
+
cells.forEach((cell) => (cell.tabIndex = -1));
|
|
2054
2149
|
cell = selectedCell || cells[0];
|
|
2055
|
-
}
|
|
2056
|
-
else {
|
|
2150
|
+
} else {
|
|
2057
2151
|
cell = utils.DomHandler.findSingle(this.overlay, 'span.p-highlight');
|
|
2152
|
+
|
|
2058
2153
|
if (!cell) {
|
|
2059
2154
|
let todayCell = utils.DomHandler.findSingle(this.overlay, 'td.p-datepicker-today span:not(.p-disabled):not(.p-ink');
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
else
|
|
2063
|
-
cell = utils.DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
|
|
2155
|
+
|
|
2156
|
+
if (todayCell) cell = todayCell;
|
|
2157
|
+
else cell = utils.DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
|
|
2064
2158
|
}
|
|
2065
2159
|
}
|
|
2066
2160
|
|
|
@@ -2081,34 +2175,27 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2081
2175
|
if (focusableElements && focusableElements.length > 0) {
|
|
2082
2176
|
if (!document.activeElement) {
|
|
2083
2177
|
focusableElements[0].focus();
|
|
2084
|
-
}
|
|
2085
|
-
else {
|
|
2178
|
+
} else {
|
|
2086
2179
|
let focusedIndex = focusableElements.indexOf(document.activeElement);
|
|
2087
2180
|
|
|
2088
2181
|
if (event.shiftKey) {
|
|
2089
|
-
if (focusedIndex === -1 || focusedIndex === 0)
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
focusableElements[focusedIndex - 1].focus();
|
|
2093
|
-
}
|
|
2094
|
-
else {
|
|
2182
|
+
if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();
|
|
2183
|
+
else focusableElements[focusedIndex - 1].focus();
|
|
2184
|
+
} else {
|
|
2095
2185
|
if (focusedIndex === -1) {
|
|
2096
2186
|
if (this.timeOnly) {
|
|
2097
2187
|
focusableElements[0].focus();
|
|
2098
|
-
}
|
|
2099
|
-
else {
|
|
2188
|
+
} else {
|
|
2100
2189
|
let spanIndex = null;
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2190
|
+
|
|
2191
|
+
for (let i = 0; i < focusableElements.length; i++) {
|
|
2192
|
+
if (focusableElements[i].tagName === 'SPAN') spanIndex = i;
|
|
2104
2193
|
}
|
|
2194
|
+
|
|
2105
2195
|
focusableElements[spanIndex].focus();
|
|
2106
2196
|
}
|
|
2107
|
-
}
|
|
2108
|
-
else
|
|
2109
|
-
focusableElements[0].focus();
|
|
2110
|
-
else
|
|
2111
|
-
focusableElements[focusedIndex + 1].focus();
|
|
2197
|
+
} else if (focusedIndex === focusableElements.length - 1) focusableElements[0].focus();
|
|
2198
|
+
else focusableElements[focusedIndex + 1].focus();
|
|
2112
2199
|
}
|
|
2113
2200
|
}
|
|
2114
2201
|
}
|
|
@@ -2117,12 +2204,12 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2117
2204
|
switch (event.code) {
|
|
2118
2205
|
case 'Tab':
|
|
2119
2206
|
this.trapFocus(event);
|
|
2120
|
-
|
|
2207
|
+
break;
|
|
2121
2208
|
|
|
2122
2209
|
case 'Escape':
|
|
2123
2210
|
this.overlayVisible = false;
|
|
2124
2211
|
event.preventDefault();
|
|
2125
|
-
|
|
2212
|
+
break;
|
|
2126
2213
|
}
|
|
2127
2214
|
|
|
2128
2215
|
this.$emit('keydown', event);
|
|
@@ -2133,26 +2220,32 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2133
2220
|
this.selectionEnd = this.input.selectionEnd;
|
|
2134
2221
|
|
|
2135
2222
|
let value = this.parseValue(event.target.value);
|
|
2223
|
+
|
|
2136
2224
|
if (this.isValidSelection(value)) {
|
|
2137
2225
|
this.typeUpdate = true;
|
|
2138
2226
|
this.updateModel(value);
|
|
2139
2227
|
}
|
|
2140
|
-
}
|
|
2141
|
-
catch(err) {
|
|
2228
|
+
} catch (err) {
|
|
2142
2229
|
/* NoOp */
|
|
2143
2230
|
}
|
|
2144
2231
|
|
|
2145
2232
|
this.$emit('input', event);
|
|
2146
2233
|
},
|
|
2234
|
+
onInputClick() {
|
|
2235
|
+
if (this.showOnFocus && this.isEnabled() && !this.overlayVisible) {
|
|
2236
|
+
this.overlayVisible = true;
|
|
2237
|
+
}
|
|
2238
|
+
},
|
|
2147
2239
|
onFocus(event) {
|
|
2148
2240
|
if (this.showOnFocus && this.isEnabled()) {
|
|
2149
2241
|
this.overlayVisible = true;
|
|
2150
2242
|
}
|
|
2243
|
+
|
|
2151
2244
|
this.focused = true;
|
|
2152
2245
|
this.$emit('focus', event);
|
|
2153
2246
|
},
|
|
2154
2247
|
onBlur(event) {
|
|
2155
|
-
this.$emit('blur', {originalEvent: event, value: event.target.value});
|
|
2248
|
+
this.$emit('blur', { originalEvent: event, value: event.target.value });
|
|
2156
2249
|
|
|
2157
2250
|
this.focused = false;
|
|
2158
2251
|
event.target.value = this.formatValue(this.modelValue);
|
|
@@ -2160,19 +2253,16 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2160
2253
|
onKeyDown(event) {
|
|
2161
2254
|
if (event.code === 'ArrowDown' && this.overlay) {
|
|
2162
2255
|
this.trapFocus(event);
|
|
2163
|
-
}
|
|
2164
|
-
else if (event.code === 'ArrowDown' && !this.overlay) {
|
|
2256
|
+
} else if (event.code === 'ArrowDown' && !this.overlay) {
|
|
2165
2257
|
this.overlayVisible = true;
|
|
2166
|
-
}
|
|
2167
|
-
else if (event.code === 'Escape') {
|
|
2258
|
+
} else if (event.code === 'Escape') {
|
|
2168
2259
|
if (this.overlayVisible) {
|
|
2169
2260
|
this.overlayVisible = false;
|
|
2170
2261
|
event.preventDefault();
|
|
2171
2262
|
}
|
|
2172
|
-
}
|
|
2173
|
-
else if (event.code === 'Tab') {
|
|
2263
|
+
} else if (event.code === 'Tab') {
|
|
2174
2264
|
if (this.overlay) {
|
|
2175
|
-
utils.DomHandler.getFocusableElements(this.overlay).forEach(el => el.tabIndex = '-1');
|
|
2265
|
+
utils.DomHandler.getFocusableElements(this.overlay).forEach((el) => (el.tabIndex = '-1'));
|
|
2176
2266
|
}
|
|
2177
2267
|
|
|
2178
2268
|
if (this.overlayVisible) {
|
|
@@ -2220,10 +2310,9 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2220
2310
|
}
|
|
2221
2311
|
|
|
2222
2312
|
let innerHTML = '';
|
|
2313
|
+
|
|
2223
2314
|
if (this.responsiveOptions) {
|
|
2224
|
-
let responsiveOptions = [...this.responsiveOptions]
|
|
2225
|
-
.filter(o => !!(o.breakpoint && o.numMonths))
|
|
2226
|
-
.sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
|
|
2315
|
+
let responsiveOptions = [...this.responsiveOptions].filter((o) => !!(o.breakpoint && o.numMonths)).sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
|
|
2227
2316
|
|
|
2228
2317
|
for (let i = 0; i < responsiveOptions.length; i++) {
|
|
2229
2318
|
let { breakpoint, numMonths } = responsiveOptions[i];
|
|
@@ -2251,7 +2340,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2251
2340
|
|
|
2252
2341
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
2253
2342
|
}
|
|
2254
|
-
|
|
2343
|
+
},
|
|
2255
2344
|
destroyResponsiveStyleElement() {
|
|
2256
2345
|
if (this.responsiveStyleElement) {
|
|
2257
2346
|
this.responsiveStyleElement.remove();
|
|
@@ -2262,19 +2351,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2262
2351
|
computed: {
|
|
2263
2352
|
viewDate() {
|
|
2264
2353
|
let propValue = this.modelValue;
|
|
2354
|
+
|
|
2265
2355
|
if (propValue && Array.isArray(propValue)) {
|
|
2266
2356
|
if (this.isRangeSelection()) {
|
|
2267
2357
|
propValue = propValue[1] || propValue[0];
|
|
2268
|
-
}
|
|
2269
|
-
else if (this.isMultipleSelection()) {
|
|
2358
|
+
} else if (this.isMultipleSelection()) {
|
|
2270
2359
|
propValue = propValue[propValue.length - 1];
|
|
2271
2360
|
}
|
|
2272
2361
|
}
|
|
2273
2362
|
|
|
2274
2363
|
if (propValue && typeof propValue !== 'string') {
|
|
2275
2364
|
return propValue;
|
|
2276
|
-
}
|
|
2277
|
-
else {
|
|
2365
|
+
} else {
|
|
2278
2366
|
let today = new Date();
|
|
2279
2367
|
|
|
2280
2368
|
if (this.maxDate && this.maxDate < today) {
|
|
@@ -2304,25 +2392,31 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2304
2392
|
];
|
|
2305
2393
|
},
|
|
2306
2394
|
panelStyleClass() {
|
|
2307
|
-
return [
|
|
2308
|
-
'p-datepicker-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2395
|
+
return [
|
|
2396
|
+
'p-datepicker p-component',
|
|
2397
|
+
this.panelClass,
|
|
2398
|
+
{
|
|
2399
|
+
'p-datepicker-inline': this.inline,
|
|
2400
|
+
'p-disabled': this.disabled,
|
|
2401
|
+
'p-datepicker-timeonly': this.timeOnly,
|
|
2402
|
+
'p-datepicker-multiple-month': this.numberOfMonths > 1,
|
|
2403
|
+
'p-datepicker-monthpicker': this.currentView === 'month',
|
|
2404
|
+
'p-datepicker-yearpicker': this.currentView === 'year',
|
|
2405
|
+
'p-datepicker-touch-ui': this.touchUI,
|
|
2406
|
+
'p-input-filled': this.$primevue.config.inputStyle === 'filled',
|
|
2407
|
+
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
2408
|
+
}
|
|
2409
|
+
];
|
|
2318
2410
|
},
|
|
2319
2411
|
months() {
|
|
2320
2412
|
let months = [];
|
|
2321
|
-
|
|
2413
|
+
|
|
2414
|
+
for (let i = 0; i < this.numberOfMonths; i++) {
|
|
2322
2415
|
let month = this.currentMonth + i;
|
|
2323
2416
|
let year = this.currentYear;
|
|
2417
|
+
|
|
2324
2418
|
if (month > 11) {
|
|
2325
|
-
month = month % 11 - 1;
|
|
2419
|
+
month = (month % 11) - 1;
|
|
2326
2420
|
year = year + 1;
|
|
2327
2421
|
}
|
|
2328
2422
|
|
|
@@ -2339,30 +2433,33 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2339
2433
|
let week = [];
|
|
2340
2434
|
|
|
2341
2435
|
if (i == 0) {
|
|
2342
|
-
for (let j =
|
|
2436
|
+
for (let j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {
|
|
2343
2437
|
let prev = this.getPreviousMonthAndYear(month, year);
|
|
2344
|
-
|
|
2345
|
-
|
|
2438
|
+
|
|
2439
|
+
week.push({ day: j, month: prev.month, year: prev.year, otherMonth: true, today: this.isToday(today, j, prev.month, prev.year), selectable: this.isSelectable(j, prev.month, prev.year, true) });
|
|
2346
2440
|
}
|
|
2347
2441
|
|
|
2348
2442
|
let remainingDaysLength = 7 - week.length;
|
|
2443
|
+
|
|
2349
2444
|
for (let j = 0; j < remainingDaysLength; j++) {
|
|
2350
|
-
week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),
|
|
2351
|
-
selectable: this.isSelectable(dayNo, month, year, false)});
|
|
2445
|
+
week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
|
|
2352
2446
|
dayNo++;
|
|
2353
2447
|
}
|
|
2354
|
-
}
|
|
2355
|
-
else {
|
|
2448
|
+
} else {
|
|
2356
2449
|
for (let j = 0; j < 7; j++) {
|
|
2357
2450
|
if (dayNo > daysLength) {
|
|
2358
2451
|
let next = this.getNextMonthAndYear(month, year);
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2452
|
+
|
|
2453
|
+
week.push({
|
|
2454
|
+
day: dayNo - daysLength,
|
|
2455
|
+
month: next.month,
|
|
2456
|
+
year: next.year,
|
|
2457
|
+
otherMonth: true,
|
|
2458
|
+
today: this.isToday(today, dayNo - daysLength, next.month, next.year),
|
|
2459
|
+
selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)
|
|
2460
|
+
});
|
|
2461
|
+
} else {
|
|
2462
|
+
week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
|
|
2366
2463
|
}
|
|
2367
2464
|
|
|
2368
2465
|
dayNo++;
|
|
@@ -2389,15 +2486,16 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2389
2486
|
weekDays() {
|
|
2390
2487
|
let weekDays = [];
|
|
2391
2488
|
let dayIndex = this.$primevue.config.locale.firstDayOfWeek;
|
|
2489
|
+
|
|
2392
2490
|
for (let i = 0; i < 7; i++) {
|
|
2393
2491
|
weekDays.push(this.$primevue.config.locale.dayNamesMin[dayIndex]);
|
|
2394
|
-
dayIndex =
|
|
2492
|
+
dayIndex = dayIndex == 6 ? 0 : ++dayIndex;
|
|
2395
2493
|
}
|
|
2396
2494
|
|
|
2397
2495
|
return weekDays;
|
|
2398
2496
|
},
|
|
2399
2497
|
ticksTo1970() {
|
|
2400
|
-
return ((
|
|
2498
|
+
return ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000;
|
|
2401
2499
|
},
|
|
2402
2500
|
sundayIndex() {
|
|
2403
2501
|
return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0;
|
|
@@ -2415,8 +2513,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2415
2513
|
|
|
2416
2514
|
if (this.currentYear < yearStart) {
|
|
2417
2515
|
$vm.currentYear = yearEnd;
|
|
2418
|
-
}
|
|
2419
|
-
else if (this.currentYear > yearEnd) {
|
|
2516
|
+
} else if (this.currentYear > yearEnd) {
|
|
2420
2517
|
$vm.currentYear = yearStart;
|
|
2421
2518
|
}
|
|
2422
2519
|
|
|
@@ -2425,13 +2522,13 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2425
2522
|
}
|
|
2426
2523
|
|
|
2427
2524
|
return yearOptions;
|
|
2428
|
-
}
|
|
2429
|
-
else {
|
|
2525
|
+
} else {
|
|
2430
2526
|
return null;
|
|
2431
2527
|
}
|
|
2432
2528
|
},
|
|
2433
2529
|
monthPickerValues() {
|
|
2434
2530
|
let monthPickerValues = [];
|
|
2531
|
+
|
|
2435
2532
|
for (let i = 0; i <= 11; i++) {
|
|
2436
2533
|
monthPickerValues.push(this.$primevue.config.locale.monthNamesShort[i]);
|
|
2437
2534
|
}
|
|
@@ -2440,7 +2537,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2440
2537
|
},
|
|
2441
2538
|
yearPickerValues() {
|
|
2442
2539
|
let yearPickerValues = [];
|
|
2443
|
-
let base = this.currentYear -
|
|
2540
|
+
let base = this.currentYear - (this.currentYear % 10);
|
|
2541
|
+
|
|
2444
2542
|
for (let i = 0; i < 10; i++) {
|
|
2445
2543
|
yearPickerValues.push(base + i);
|
|
2446
2544
|
}
|
|
@@ -2479,16 +2577,16 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2479
2577
|
}
|
|
2480
2578
|
},
|
|
2481
2579
|
components: {
|
|
2482
|
-
|
|
2483
|
-
|
|
2580
|
+
CalendarButton: Button__default["default"],
|
|
2581
|
+
Portal: Portal__default["default"]
|
|
2484
2582
|
},
|
|
2485
2583
|
directives: {
|
|
2486
|
-
|
|
2584
|
+
ripple: Ripple__default["default"]
|
|
2487
2585
|
}
|
|
2488
2586
|
};
|
|
2489
2587
|
|
|
2490
2588
|
const _hoisted_1 = ["id"];
|
|
2491
|
-
const _hoisted_2 = ["id", "placeholder", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "readonly"];
|
|
2589
|
+
const _hoisted_2 = ["id", "placeholder", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly"];
|
|
2492
2590
|
const _hoisted_3 = ["id", "role", "aria-modal", "aria-label"];
|
|
2493
2591
|
const _hoisted_4 = { class: "p-datepicker-group-container" };
|
|
2494
2592
|
const _hoisted_5 = { class: "p-datepicker-header" };
|
|
@@ -2641,9 +2739,9 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2641
2739
|
? (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
2642
2740
|
key: 0,
|
|
2643
2741
|
ref: $options.inputRef,
|
|
2742
|
+
id: $props.inputId,
|
|
2644
2743
|
type: "text",
|
|
2645
2744
|
role: "combobox",
|
|
2646
|
-
id: $props.inputId,
|
|
2647
2745
|
class: ['p-inputtext p-component', $props.inputClass],
|
|
2648
2746
|
style: $props.inputStyle,
|
|
2649
2747
|
placeholder: $props.placeholder,
|
|
@@ -2654,12 +2752,14 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2654
2752
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
2655
2753
|
"aria-label": _ctx.ariaLabel,
|
|
2656
2754
|
inputmode: "none",
|
|
2657
|
-
|
|
2658
|
-
onFocus: _cache[1] || (_cache[1] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
2659
|
-
onBlur: _cache[2] || (_cache[2] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
2660
|
-
onKeydown: _cache[3] || (_cache[3] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
2755
|
+
disabled: $props.disabled,
|
|
2661
2756
|
readonly: !$props.manualInput,
|
|
2662
|
-
tabindex: 0
|
|
2757
|
+
tabindex: 0,
|
|
2758
|
+
onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args))),
|
|
2759
|
+
onClick: _cache[1] || (_cache[1] = (...args) => ($options.onInputClick && $options.onInputClick(...args))),
|
|
2760
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
2761
|
+
onBlur: _cache[3] || (_cache[3] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
2762
|
+
onKeydown: _cache[4] || (_cache[4] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args)))
|
|
2663
2763
|
}, $props.inputProps), null, 16, _hoisted_2))
|
|
2664
2764
|
: vue.createCommentVNode("", true),
|
|
2665
2765
|
($props.showIcon)
|
|
@@ -2683,7 +2783,7 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2683
2783
|
default: vue.withCtx(() => [
|
|
2684
2784
|
vue.createVNode(vue.Transition, {
|
|
2685
2785
|
name: "p-connected-overlay",
|
|
2686
|
-
onEnter: _cache[
|
|
2786
|
+
onEnter: _cache[68] || (_cache[68] = $event => ($options.onOverlayEnter($event))),
|
|
2687
2787
|
onAfterEnter: $options.onOverlayEnterComplete,
|
|
2688
2788
|
onAfterLeave: $options.onOverlayAfterLeave,
|
|
2689
2789
|
onLeave: $options.onOverlayLeave
|
|
@@ -2699,27 +2799,27 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2699
2799
|
role: $props.inline ? null : 'dialog',
|
|
2700
2800
|
"aria-modal": $props.inline ? null : 'true',
|
|
2701
2801
|
"aria-label": _ctx.$primevue.config.locale.chooseDate,
|
|
2702
|
-
onClick: _cache[
|
|
2703
|
-
onKeydown: _cache[
|
|
2704
|
-
onMouseup: _cache[
|
|
2802
|
+
onClick: _cache[65] || (_cache[65] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),
|
|
2803
|
+
onKeydown: _cache[66] || (_cache[66] = (...args) => ($options.onOverlayKeyDown && $options.onOverlayKeyDown(...args))),
|
|
2804
|
+
onMouseup: _cache[67] || (_cache[67] = (...args) => ($options.onOverlayMouseUp && $options.onOverlayMouseUp(...args)))
|
|
2705
2805
|
}, $props.panelProps), [
|
|
2706
2806
|
(!$props.timeOnly)
|
|
2707
2807
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
2708
2808
|
vue.createElementVNode("div", _hoisted_4, [
|
|
2709
2809
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.months, (month, groupIndex) => {
|
|
2710
2810
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
2711
|
-
|
|
2712
|
-
|
|
2811
|
+
key: month.month + month.year,
|
|
2812
|
+
class: "p-datepicker-group"
|
|
2713
2813
|
}, [
|
|
2714
2814
|
vue.createElementVNode("div", _hoisted_5, [
|
|
2715
2815
|
vue.renderSlot(_ctx.$slots, "header"),
|
|
2716
2816
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2717
2817
|
class: "p-datepicker-prev p-link",
|
|
2718
|
-
onClick: _cache[
|
|
2818
|
+
onClick: _cache[5] || (_cache[5] = (...args) => ($options.onPrevButtonClick && $options.onPrevButtonClick(...args))),
|
|
2719
2819
|
type: "button",
|
|
2720
|
-
onKeydown: _cache[
|
|
2820
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2721
2821
|
disabled: $props.disabled,
|
|
2722
|
-
"aria-label":
|
|
2822
|
+
"aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.prevDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.prevYear : _ctx.$primevue.config.locale.prevMonth
|
|
2723
2823
|
}, _hoisted_8, 40, _hoisted_6)), [
|
|
2724
2824
|
[vue.vShow, $props.showOtherMonths ? groupIndex === 0 : false],
|
|
2725
2825
|
[_directive_ripple]
|
|
@@ -2729,8 +2829,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2729
2829
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2730
2830
|
key: 0,
|
|
2731
2831
|
type: "button",
|
|
2732
|
-
onClick: _cache[
|
|
2733
|
-
onKeydown: _cache[
|
|
2832
|
+
onClick: _cache[7] || (_cache[7] = (...args) => ($options.switchToMonthView && $options.switchToMonthView(...args))),
|
|
2833
|
+
onKeydown: _cache[8] || (_cache[8] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2734
2834
|
class: "p-datepicker-month p-link",
|
|
2735
2835
|
disabled: $options.switchViewButtonDisabled,
|
|
2736
2836
|
"aria-label": _ctx.$primevue.config.locale.chooseMonth
|
|
@@ -2740,8 +2840,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2740
2840
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2741
2841
|
key: 1,
|
|
2742
2842
|
type: "button",
|
|
2743
|
-
onClick: _cache[
|
|
2744
|
-
onKeydown: _cache[
|
|
2843
|
+
onClick: _cache[9] || (_cache[9] = (...args) => ($options.switchToYearView && $options.switchToYearView(...args))),
|
|
2844
|
+
onKeydown: _cache[10] || (_cache[10] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2745
2845
|
class: "p-datepicker-year p-link",
|
|
2746
2846
|
disabled: $options.switchViewButtonDisabled,
|
|
2747
2847
|
"aria-label": _ctx.$primevue.config.locale.chooseYear
|
|
@@ -2757,17 +2857,17 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2757
2857
|
]),
|
|
2758
2858
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2759
2859
|
class: "p-datepicker-next p-link",
|
|
2760
|
-
onClick: _cache[
|
|
2860
|
+
onClick: _cache[11] || (_cache[11] = (...args) => ($options.onNextButtonClick && $options.onNextButtonClick(...args))),
|
|
2761
2861
|
type: "button",
|
|
2762
|
-
onKeydown: _cache[
|
|
2862
|
+
onKeydown: _cache[12] || (_cache[12] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2763
2863
|
disabled: $props.disabled,
|
|
2764
|
-
"aria-label":
|
|
2864
|
+
"aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.nextDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.nextYear : _ctx.$primevue.config.locale.nextMonth
|
|
2765
2865
|
}, _hoisted_15, 40, _hoisted_13)), [
|
|
2766
|
-
[vue.vShow, $props.showOtherMonths ? $props.numberOfMonths === 1 ? true :
|
|
2866
|
+
[vue.vShow, $props.showOtherMonths ? ($props.numberOfMonths === 1 ? true : groupIndex === $props.numberOfMonths - 1) : false],
|
|
2767
2867
|
[_directive_ripple]
|
|
2768
2868
|
])
|
|
2769
2869
|
]),
|
|
2770
|
-
($data.currentView ==='date')
|
|
2870
|
+
($data.currentView === 'date')
|
|
2771
2871
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
|
|
2772
2872
|
vue.createElementVNode("table", _hoisted_17, [
|
|
2773
2873
|
vue.createElementVNode("thead", null, [
|
|
@@ -2779,8 +2879,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2779
2879
|
: vue.createCommentVNode("", true),
|
|
2780
2880
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.weekDays, (weekDay) => {
|
|
2781
2881
|
return (vue.openBlock(), vue.createElementBlock("th", {
|
|
2782
|
-
scope: "col",
|
|
2783
2882
|
key: weekDay,
|
|
2883
|
+
scope: "col",
|
|
2784
2884
|
abbr: weekDay
|
|
2785
2885
|
}, [
|
|
2786
2886
|
vue.createElementVNode("span", null, vue.toDisplayString(weekDay), 1)
|
|
@@ -2805,15 +2905,15 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2805
2905
|
: vue.createCommentVNode("", true),
|
|
2806
2906
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(week, (date) => {
|
|
2807
2907
|
return (vue.openBlock(), vue.createElementBlock("td", {
|
|
2808
|
-
"aria-label": date.day,
|
|
2809
2908
|
key: date.day + '' + date.month,
|
|
2810
|
-
|
|
2909
|
+
"aria-label": date.day,
|
|
2910
|
+
class: vue.normalizeClass({ 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today })
|
|
2811
2911
|
}, [
|
|
2812
2912
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
|
|
2813
|
-
class: vue.normalizeClass({'p-highlight': $options.isSelected(date), 'p-disabled': !date.selectable}),
|
|
2913
|
+
class: vue.normalizeClass({ 'p-highlight': $options.isSelected(date), 'p-disabled': !date.selectable }),
|
|
2814
2914
|
onClick: $event => ($options.onDateSelect($event, date)),
|
|
2815
2915
|
draggable: "false",
|
|
2816
|
-
onKeydown: $event => ($options.onDateCellKeydown($event,date,groupIndex)),
|
|
2916
|
+
onKeydown: $event => ($options.onDateCellKeydown($event, date, groupIndex)),
|
|
2817
2917
|
"aria-selected": $options.isSelected(date)
|
|
2818
2918
|
}, [
|
|
2819
2919
|
vue.renderSlot(_ctx.$slots, "date", { date: date }, () => [
|
|
@@ -2842,8 +2942,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2842
2942
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
|
|
2843
2943
|
key: m,
|
|
2844
2944
|
onClick: $event => ($options.onMonthSelect($event, i)),
|
|
2845
|
-
onKeydown: $event => ($options.onMonthCellKeydown($event,i)),
|
|
2846
|
-
class: vue.normalizeClass(["p-monthpicker-month", {'p-highlight': $options.isMonthSelected(i)}])
|
|
2945
|
+
onKeydown: $event => ($options.onMonthCellKeydown($event, i)),
|
|
2946
|
+
class: vue.normalizeClass(["p-monthpicker-month", { 'p-highlight': $options.isMonthSelected(i) }])
|
|
2847
2947
|
}, [
|
|
2848
2948
|
vue.createTextVNode(vue.toDisplayString(m) + " ", 1),
|
|
2849
2949
|
($options.isMonthSelected(i))
|
|
@@ -2861,8 +2961,8 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2861
2961
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
|
|
2862
2962
|
key: y,
|
|
2863
2963
|
onClick: $event => ($options.onYearSelect($event, y)),
|
|
2864
|
-
onKeydown: $event => ($options.onYearCellKeydown($event,y)),
|
|
2865
|
-
class: vue.normalizeClass(["p-yearpicker-year", {'p-highlight': $options.isYearSelected(y)}])
|
|
2964
|
+
onKeydown: $event => ($options.onYearCellKeydown($event, y)),
|
|
2965
|
+
class: vue.normalizeClass(["p-yearpicker-year", { 'p-highlight': $options.isYearSelected(y) }])
|
|
2866
2966
|
}, [
|
|
2867
2967
|
vue.createTextVNode(vue.toDisplayString(y) + " ", 1),
|
|
2868
2968
|
($options.isYearSelected(y))
|
|
@@ -2876,23 +2976,23 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2876
2976
|
: vue.createCommentVNode("", true)
|
|
2877
2977
|
], 64))
|
|
2878
2978
|
: vue.createCommentVNode("", true),
|
|
2879
|
-
(($props.showTime
|
|
2979
|
+
(($props.showTime || $props.timeOnly) && $data.currentView === 'date')
|
|
2880
2980
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_32, [
|
|
2881
2981
|
vue.createElementVNode("div", _hoisted_33, [
|
|
2882
2982
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2883
2983
|
class: "p-link",
|
|
2884
2984
|
"aria-label": _ctx.$primevue.config.locale.nextHour,
|
|
2885
|
-
onMousedown: _cache[
|
|
2886
|
-
onMouseup: _cache[
|
|
2985
|
+
onMousedown: _cache[13] || (_cache[13] = $event => ($options.onTimePickerElementMouseDown($event, 0, 1))),
|
|
2986
|
+
onMouseup: _cache[14] || (_cache[14] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2887
2987
|
onKeydown: [
|
|
2888
|
-
_cache[
|
|
2889
|
-
_cache[
|
|
2890
|
-
_cache[
|
|
2988
|
+
_cache[15] || (_cache[15] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2989
|
+
_cache[17] || (_cache[17] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["enter"])),
|
|
2990
|
+
_cache[18] || (_cache[18] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["space"]))
|
|
2891
2991
|
],
|
|
2892
|
-
onMouseleave: _cache[
|
|
2992
|
+
onMouseleave: _cache[16] || (_cache[16] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2893
2993
|
onKeyup: [
|
|
2894
|
-
_cache[
|
|
2895
|
-
_cache[
|
|
2994
|
+
_cache[19] || (_cache[19] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
2995
|
+
_cache[20] || (_cache[20] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2896
2996
|
],
|
|
2897
2997
|
type: "button"
|
|
2898
2998
|
}, _hoisted_36, 40, _hoisted_34)), [
|
|
@@ -2902,17 +3002,17 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2902
3002
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2903
3003
|
class: "p-link",
|
|
2904
3004
|
"aria-label": _ctx.$primevue.config.locale.prevHour,
|
|
2905
|
-
onMousedown: _cache[
|
|
2906
|
-
onMouseup: _cache[
|
|
3005
|
+
onMousedown: _cache[21] || (_cache[21] = $event => ($options.onTimePickerElementMouseDown($event, 0, -1))),
|
|
3006
|
+
onMouseup: _cache[22] || (_cache[22] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2907
3007
|
onKeydown: [
|
|
2908
|
-
_cache[
|
|
2909
|
-
_cache[
|
|
2910
|
-
_cache[
|
|
3008
|
+
_cache[23] || (_cache[23] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3009
|
+
_cache[25] || (_cache[25] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["enter"])),
|
|
3010
|
+
_cache[26] || (_cache[26] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["space"]))
|
|
2911
3011
|
],
|
|
2912
|
-
onMouseleave: _cache[
|
|
3012
|
+
onMouseleave: _cache[24] || (_cache[24] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2913
3013
|
onKeyup: [
|
|
2914
|
-
_cache[
|
|
2915
|
-
_cache[
|
|
3014
|
+
_cache[27] || (_cache[27] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3015
|
+
_cache[28] || (_cache[28] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2916
3016
|
],
|
|
2917
3017
|
type: "button"
|
|
2918
3018
|
}, _hoisted_39, 40, _hoisted_37)), [
|
|
@@ -2926,18 +3026,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2926
3026
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2927
3027
|
class: "p-link",
|
|
2928
3028
|
"aria-label": _ctx.$primevue.config.locale.nextMinute,
|
|
2929
|
-
onMousedown: _cache[
|
|
2930
|
-
onMouseup: _cache[
|
|
3029
|
+
onMousedown: _cache[29] || (_cache[29] = $event => ($options.onTimePickerElementMouseDown($event, 1, 1))),
|
|
3030
|
+
onMouseup: _cache[30] || (_cache[30] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2931
3031
|
onKeydown: [
|
|
2932
|
-
_cache[
|
|
2933
|
-
_cache[
|
|
2934
|
-
_cache[
|
|
3032
|
+
_cache[31] || (_cache[31] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3033
|
+
_cache[33] || (_cache[33] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["enter"])),
|
|
3034
|
+
_cache[34] || (_cache[34] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["space"]))
|
|
2935
3035
|
],
|
|
2936
3036
|
disabled: $props.disabled,
|
|
2937
|
-
onMouseleave: _cache[
|
|
3037
|
+
onMouseleave: _cache[32] || (_cache[32] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2938
3038
|
onKeyup: [
|
|
2939
|
-
_cache[
|
|
2940
|
-
_cache[
|
|
3039
|
+
_cache[35] || (_cache[35] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3040
|
+
_cache[36] || (_cache[36] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2941
3041
|
],
|
|
2942
3042
|
type: "button"
|
|
2943
3043
|
}, _hoisted_44, 40, _hoisted_42)), [
|
|
@@ -2947,18 +3047,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2947
3047
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2948
3048
|
class: "p-link",
|
|
2949
3049
|
"aria-label": _ctx.$primevue.config.locale.prevMinute,
|
|
2950
|
-
onMousedown: _cache[
|
|
2951
|
-
onMouseup: _cache[
|
|
3050
|
+
onMousedown: _cache[37] || (_cache[37] = $event => ($options.onTimePickerElementMouseDown($event, 1, -1))),
|
|
3051
|
+
onMouseup: _cache[38] || (_cache[38] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2952
3052
|
onKeydown: [
|
|
2953
|
-
_cache[
|
|
2954
|
-
_cache[
|
|
2955
|
-
_cache[
|
|
3053
|
+
_cache[39] || (_cache[39] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3054
|
+
_cache[41] || (_cache[41] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["enter"])),
|
|
3055
|
+
_cache[42] || (_cache[42] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["space"]))
|
|
2956
3056
|
],
|
|
2957
3057
|
disabled: $props.disabled,
|
|
2958
|
-
onMouseleave: _cache[
|
|
3058
|
+
onMouseleave: _cache[40] || (_cache[40] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2959
3059
|
onKeyup: [
|
|
2960
|
-
_cache[
|
|
2961
|
-
_cache[
|
|
3060
|
+
_cache[43] || (_cache[43] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3061
|
+
_cache[44] || (_cache[44] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2962
3062
|
],
|
|
2963
3063
|
type: "button"
|
|
2964
3064
|
}, _hoisted_47, 40, _hoisted_45)), [
|
|
@@ -2975,18 +3075,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2975
3075
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2976
3076
|
class: "p-link",
|
|
2977
3077
|
"aria-label": _ctx.$primevue.config.locale.nextSecond,
|
|
2978
|
-
onMousedown: _cache[
|
|
2979
|
-
onMouseup: _cache[
|
|
3078
|
+
onMousedown: _cache[45] || (_cache[45] = $event => ($options.onTimePickerElementMouseDown($event, 2, 1))),
|
|
3079
|
+
onMouseup: _cache[46] || (_cache[46] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2980
3080
|
onKeydown: [
|
|
2981
|
-
_cache[
|
|
2982
|
-
_cache[
|
|
2983
|
-
_cache[
|
|
3081
|
+
_cache[47] || (_cache[47] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3082
|
+
_cache[49] || (_cache[49] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["enter"])),
|
|
3083
|
+
_cache[50] || (_cache[50] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["space"]))
|
|
2984
3084
|
],
|
|
2985
3085
|
disabled: $props.disabled,
|
|
2986
|
-
onMouseleave: _cache[
|
|
3086
|
+
onMouseleave: _cache[48] || (_cache[48] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2987
3087
|
onKeyup: [
|
|
2988
|
-
_cache[
|
|
2989
|
-
_cache[
|
|
3088
|
+
_cache[51] || (_cache[51] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3089
|
+
_cache[52] || (_cache[52] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2990
3090
|
],
|
|
2991
3091
|
type: "button"
|
|
2992
3092
|
}, _hoisted_52, 40, _hoisted_50)), [
|
|
@@ -2996,18 +3096,18 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
2996
3096
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2997
3097
|
class: "p-link",
|
|
2998
3098
|
"aria-label": _ctx.$primevue.config.locale.prevSecond,
|
|
2999
|
-
onMousedown: _cache[
|
|
3000
|
-
onMouseup: _cache[
|
|
3099
|
+
onMousedown: _cache[53] || (_cache[53] = $event => ($options.onTimePickerElementMouseDown($event, 2, -1))),
|
|
3100
|
+
onMouseup: _cache[54] || (_cache[54] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
3001
3101
|
onKeydown: [
|
|
3002
|
-
_cache[
|
|
3003
|
-
_cache[
|
|
3004
|
-
_cache[
|
|
3102
|
+
_cache[55] || (_cache[55] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3103
|
+
_cache[57] || (_cache[57] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["enter"])),
|
|
3104
|
+
_cache[58] || (_cache[58] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["space"]))
|
|
3005
3105
|
],
|
|
3006
3106
|
disabled: $props.disabled,
|
|
3007
|
-
onMouseleave: _cache[
|
|
3107
|
+
onMouseleave: _cache[56] || (_cache[56] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
3008
3108
|
onKeyup: [
|
|
3009
|
-
_cache[
|
|
3010
|
-
_cache[
|
|
3109
|
+
_cache[59] || (_cache[59] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3110
|
+
_cache[60] || (_cache[60] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
3011
3111
|
],
|
|
3012
3112
|
type: "button"
|
|
3013
3113
|
}, _hoisted_55, 40, _hoisted_53)), [
|
|
@@ -3015,27 +3115,27 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
3015
3115
|
])
|
|
3016
3116
|
]))
|
|
3017
3117
|
: vue.createCommentVNode("", true),
|
|
3018
|
-
($props.hourFormat=='12')
|
|
3118
|
+
($props.hourFormat == '12')
|
|
3019
3119
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_56, [
|
|
3020
3120
|
vue.createElementVNode("span", null, vue.toDisplayString($props.timeSeparator), 1)
|
|
3021
3121
|
]))
|
|
3022
3122
|
: vue.createCommentVNode("", true),
|
|
3023
|
-
($props.hourFormat=='12')
|
|
3123
|
+
($props.hourFormat == '12')
|
|
3024
3124
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_57, [
|
|
3025
3125
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
3026
3126
|
class: "p-link",
|
|
3027
3127
|
"aria-label": _ctx.$primevue.config.locale.am,
|
|
3028
|
-
onClick: _cache[
|
|
3128
|
+
onClick: _cache[61] || (_cache[61] = $event => ($options.toggleAMPM($event))),
|
|
3029
3129
|
type: "button",
|
|
3030
3130
|
disabled: $props.disabled
|
|
3031
3131
|
}, _hoisted_60, 8, _hoisted_58)), [
|
|
3032
3132
|
[_directive_ripple]
|
|
3033
3133
|
]),
|
|
3034
|
-
vue.createElementVNode("span", null, vue.toDisplayString($data.pm ?
|
|
3134
|
+
vue.createElementVNode("span", null, vue.toDisplayString($data.pm ? _ctx.$primevue.config.locale.pm : _ctx.$primevue.config.locale.am), 1),
|
|
3035
3135
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
3036
3136
|
class: "p-link",
|
|
3037
3137
|
"aria-label": _ctx.$primevue.config.locale.pm,
|
|
3038
|
-
onClick: _cache[
|
|
3138
|
+
onClick: _cache[62] || (_cache[62] = $event => ($options.toggleAMPM($event))),
|
|
3039
3139
|
type: "button",
|
|
3040
3140
|
disabled: $props.disabled
|
|
3041
3141
|
}, _hoisted_63, 8, _hoisted_61)), [
|
|
@@ -3050,14 +3150,14 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
3050
3150
|
vue.createVNode(_component_CalendarButton, {
|
|
3051
3151
|
type: "button",
|
|
3052
3152
|
label: $options.todayLabel,
|
|
3053
|
-
onClick: _cache[
|
|
3153
|
+
onClick: _cache[63] || (_cache[63] = $event => ($options.onTodayButtonClick($event))),
|
|
3054
3154
|
class: "p-button-text",
|
|
3055
3155
|
onKeydown: $options.onContainerButtonKeydown
|
|
3056
3156
|
}, null, 8, ["label", "onKeydown"]),
|
|
3057
3157
|
vue.createVNode(_component_CalendarButton, {
|
|
3058
3158
|
type: "button",
|
|
3059
3159
|
label: $options.clearLabel,
|
|
3060
|
-
onClick: _cache[
|
|
3160
|
+
onClick: _cache[64] || (_cache[64] = $event => ($options.onClearButtonClick($event))),
|
|
3061
3161
|
class: "p-button-text",
|
|
3062
3162
|
onKeydown: $options.onContainerButtonKeydown
|
|
3063
3163
|
}, null, 8, ["label", "onKeydown"])
|
|
@@ -3102,11 +3202,11 @@ this.primevue.calendar = (function (utils, OverlayEventBus, Button, Ripple, Port
|
|
|
3102
3202
|
}
|
|
3103
3203
|
}
|
|
3104
3204
|
|
|
3105
|
-
var css_248z = "\n.p-calendar {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n max-width: 100%;\n}\n.p-calendar .p-inputtext {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n}\n.p-calendar-w-btn .p-inputtext {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-calendar-w-btn .p-datepicker-trigger {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n/* Fluid */\n.p-fluid .p-calendar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-calendar .p-inputtext {\n width: 1%;\n}\n\n/* Datepicker */\n.p-calendar .p-datepicker {\n min-width: 100%;\n}\n.p-datepicker {\n
|
|
3205
|
+
var css_248z = "\n.p-calendar {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n max-width: 100%;\n}\n.p-calendar .p-inputtext {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n}\n.p-calendar-w-btn .p-inputtext {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-calendar-w-btn .p-datepicker-trigger {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n/* Fluid */\n.p-fluid .p-calendar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-calendar .p-inputtext {\n width: 1%;\n}\n\n/* Datepicker */\n.p-calendar .p-datepicker {\n min-width: 100%;\n}\n.p-datepicker {\n width: auto;\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-datepicker-inline {\n display: inline-block;\n position: static;\n overflow-x: auto;\n}\n\n/* Header */\n.p-datepicker-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-datepicker-header .p-datepicker-title {\n margin: 0 auto;\n}\n.p-datepicker-prev,\n.p-datepicker-next {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Multiple Month DatePicker */\n.p-datepicker-multiple-month .p-datepicker-group-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n\n/* DatePicker Table */\n.p-datepicker table {\n width: 100%;\n border-collapse: collapse;\n}\n.p-datepicker td > span {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n margin: 0 auto;\n overflow: hidden;\n position: relative;\n}\n\n/* Month Picker */\n.p-monthpicker-month {\n width: 33.3%;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n/* Year Picker */\n.p-yearpicker-year {\n width: 50%;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n/* Button Bar */\n.p-datepicker-buttonbar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n/* Time Picker */\n.p-timepicker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-timepicker button {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-timepicker > div {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n/* Touch UI */\n.p-datepicker-touch-ui,\n.p-calendar .p-datepicker-touch-ui {\n position: fixed;\n top: 50%;\n left: 50%;\n min-width: 80vw;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n";
|
|
3106
3206
|
styleInject(css_248z);
|
|
3107
3207
|
|
|
3108
3208
|
script.render = render;
|
|
3109
3209
|
|
|
3110
3210
|
return script;
|
|
3111
3211
|
|
|
3112
|
-
})(primevue.
|
|
3212
|
+
})(primevue.button, primevue.overlayeventbus, primevue.portal, primevue.ripple, primevue.utils, Vue);
|