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.cjs.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var utils = require('primevue/utils');
|
|
4
|
-
var OverlayEventBus = require('primevue/overlayeventbus');
|
|
5
3
|
var Button = require('primevue/button');
|
|
6
|
-
var
|
|
4
|
+
var OverlayEventBus = require('primevue/overlayeventbus');
|
|
7
5
|
var Portal = require('primevue/portal');
|
|
6
|
+
var Ripple = require('primevue/ripple');
|
|
7
|
+
var utils = require('primevue/utils');
|
|
8
8
|
var vue = require('vue');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
|
-
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
13
12
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
14
|
-
var
|
|
13
|
+
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
15
14
|
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
15
|
+
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
16
16
|
|
|
17
17
|
var script = {
|
|
18
18
|
name: 'Calendar',
|
|
@@ -176,17 +176,41 @@ var script = {
|
|
|
176
176
|
type: String,
|
|
177
177
|
default: null
|
|
178
178
|
},
|
|
179
|
-
id:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
id: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: null
|
|
182
|
+
},
|
|
183
|
+
inputId: {
|
|
184
|
+
type: String,
|
|
185
|
+
default: null
|
|
186
|
+
},
|
|
187
|
+
inputClass: {
|
|
188
|
+
type: String,
|
|
189
|
+
default: null
|
|
190
|
+
},
|
|
191
|
+
inputStyle: {
|
|
192
|
+
type: null,
|
|
193
|
+
default: null
|
|
194
|
+
},
|
|
195
|
+
inputProps: {
|
|
196
|
+
type: null,
|
|
197
|
+
default: null
|
|
198
|
+
},
|
|
199
|
+
panelClass: {
|
|
200
|
+
type: String,
|
|
201
|
+
default: null
|
|
202
|
+
},
|
|
203
|
+
panelStyle: {
|
|
204
|
+
type: null,
|
|
205
|
+
default: null
|
|
206
|
+
},
|
|
207
|
+
panelProps: {
|
|
208
|
+
type: null,
|
|
209
|
+
default: null
|
|
210
|
+
},
|
|
187
211
|
'aria-labelledby': {
|
|
188
212
|
type: String,
|
|
189
|
-
|
|
213
|
+
default: null
|
|
190
214
|
},
|
|
191
215
|
'aria-label': {
|
|
192
216
|
type: String,
|
|
@@ -205,6 +229,55 @@ var script = {
|
|
|
205
229
|
timePickerTimer: null,
|
|
206
230
|
preventFocus: false,
|
|
207
231
|
typeUpdate: false,
|
|
232
|
+
data() {
|
|
233
|
+
return {
|
|
234
|
+
currentMonth: null,
|
|
235
|
+
currentYear: null,
|
|
236
|
+
currentHour: null,
|
|
237
|
+
currentMinute: null,
|
|
238
|
+
currentSecond: null,
|
|
239
|
+
pm: null,
|
|
240
|
+
focused: false,
|
|
241
|
+
overlayVisible: false,
|
|
242
|
+
currentView: this.view
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
watch: {
|
|
246
|
+
modelValue(newValue) {
|
|
247
|
+
this.updateCurrentMetaData();
|
|
248
|
+
|
|
249
|
+
if (!this.typeUpdate && !this.inline && this.input) {
|
|
250
|
+
this.input.value = this.formatValue(newValue);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
this.typeUpdate = false;
|
|
254
|
+
},
|
|
255
|
+
showTime() {
|
|
256
|
+
this.updateCurrentMetaData();
|
|
257
|
+
},
|
|
258
|
+
months() {
|
|
259
|
+
if (this.overlay) {
|
|
260
|
+
if (!this.focused) {
|
|
261
|
+
if (this.inline) {
|
|
262
|
+
this.preventFocus = true;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
setTimeout(this.updateFocus, 0);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
numberOfMonths() {
|
|
270
|
+
this.destroyResponsiveStyleElement();
|
|
271
|
+
this.createResponsiveStyle();
|
|
272
|
+
},
|
|
273
|
+
responsiveOptions() {
|
|
274
|
+
this.destroyResponsiveStyleElement();
|
|
275
|
+
this.createResponsiveStyle();
|
|
276
|
+
},
|
|
277
|
+
currentView() {
|
|
278
|
+
Promise.resolve(null).then(() => this.alignOverlay());
|
|
279
|
+
}
|
|
280
|
+
},
|
|
208
281
|
created() {
|
|
209
282
|
this.updateCurrentMetaData();
|
|
210
283
|
},
|
|
@@ -222,8 +295,7 @@ var script = {
|
|
|
222
295
|
this.overlay.style.width = utils.DomHandler.getOuterWidth(this.$el) + 'px';
|
|
223
296
|
}
|
|
224
297
|
}
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
298
|
+
} else {
|
|
227
299
|
this.input.value = this.formatValue(this.modelValue);
|
|
228
300
|
}
|
|
229
301
|
},
|
|
@@ -248,6 +320,7 @@ var script = {
|
|
|
248
320
|
if (this.mask) {
|
|
249
321
|
this.destroyMask();
|
|
250
322
|
}
|
|
323
|
+
|
|
251
324
|
this.destroyResponsiveStyleElement();
|
|
252
325
|
|
|
253
326
|
this.unbindOutsideClickListener();
|
|
@@ -261,51 +334,9 @@ var script = {
|
|
|
261
334
|
if (this.overlay && this.autoZIndex) {
|
|
262
335
|
utils.ZIndexUtils.clear(this.overlay);
|
|
263
336
|
}
|
|
337
|
+
|
|
264
338
|
this.overlay = null;
|
|
265
339
|
},
|
|
266
|
-
data() {
|
|
267
|
-
return {
|
|
268
|
-
currentMonth: null,
|
|
269
|
-
currentYear: null,
|
|
270
|
-
currentHour: null,
|
|
271
|
-
currentMinute: null,
|
|
272
|
-
currentSecond: null,
|
|
273
|
-
pm: null,
|
|
274
|
-
focused: false,
|
|
275
|
-
overlayVisible: false,
|
|
276
|
-
currentView: this.view
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
watch: {
|
|
280
|
-
modelValue(newValue) {
|
|
281
|
-
this.updateCurrentMetaData();
|
|
282
|
-
if (!this.typeUpdate && !this.inline && this.input) {
|
|
283
|
-
this.input.value = this.formatValue(newValue);
|
|
284
|
-
}
|
|
285
|
-
this.typeUpdate = false;
|
|
286
|
-
},
|
|
287
|
-
showTime() {
|
|
288
|
-
this.updateCurrentMetaData();
|
|
289
|
-
},
|
|
290
|
-
months() {
|
|
291
|
-
if (this.overlay) {
|
|
292
|
-
if (!this.focused) {
|
|
293
|
-
setTimeout(this.updateFocus, 0);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
numberOfMonths() {
|
|
298
|
-
this.destroyResponsiveStyleElement();
|
|
299
|
-
this.createResponsiveStyle();
|
|
300
|
-
},
|
|
301
|
-
responsiveOptions() {
|
|
302
|
-
this.destroyResponsiveStyleElement();
|
|
303
|
-
this.createResponsiveStyle();
|
|
304
|
-
},
|
|
305
|
-
currentView() {
|
|
306
|
-
Promise.resolve(null).then(() => this.alignOverlay());
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
340
|
methods: {
|
|
310
341
|
isComparable() {
|
|
311
342
|
return this.modelValue != null && typeof this.modelValue !== 'string';
|
|
@@ -318,25 +349,23 @@ var script = {
|
|
|
318
349
|
if (this.modelValue) {
|
|
319
350
|
if (this.isSingleSelection()) {
|
|
320
351
|
return this.isDateEquals(this.modelValue, dateMeta);
|
|
321
|
-
}
|
|
322
|
-
else if (this.isMultipleSelection()) {
|
|
352
|
+
} else if (this.isMultipleSelection()) {
|
|
323
353
|
let selected = false;
|
|
354
|
+
|
|
324
355
|
for (let date of this.modelValue) {
|
|
325
356
|
selected = this.isDateEquals(date, dateMeta);
|
|
357
|
+
|
|
326
358
|
if (selected) {
|
|
327
359
|
break;
|
|
328
360
|
}
|
|
329
361
|
}
|
|
330
362
|
|
|
331
363
|
return selected;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
if (this.modelValue[1])
|
|
335
|
-
return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);
|
|
364
|
+
} else if (this.isRangeSelection()) {
|
|
365
|
+
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);
|
|
336
366
|
else {
|
|
337
367
|
return this.isDateEquals(this.modelValue[0], dateMeta);
|
|
338
368
|
}
|
|
339
|
-
|
|
340
369
|
}
|
|
341
370
|
}
|
|
342
371
|
|
|
@@ -346,7 +375,7 @@ var script = {
|
|
|
346
375
|
if (this.isComparable()) {
|
|
347
376
|
let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
348
377
|
|
|
349
|
-
return !this.isMultipleSelection() ?
|
|
378
|
+
return !this.isMultipleSelection() ? value.getMonth() === month && value.getFullYear() === this.currentYear : false;
|
|
350
379
|
}
|
|
351
380
|
|
|
352
381
|
return false;
|
|
@@ -355,21 +384,21 @@ var script = {
|
|
|
355
384
|
if (this.isComparable()) {
|
|
356
385
|
let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
357
386
|
|
|
358
|
-
return !this.isMultipleSelection() && this.isComparable() ?
|
|
387
|
+
return !this.isMultipleSelection() && this.isComparable() ? value.getFullYear() === year : false;
|
|
359
388
|
}
|
|
360
389
|
|
|
361
390
|
return false;
|
|
362
391
|
},
|
|
363
392
|
isDateEquals(value, dateMeta) {
|
|
364
|
-
if (value)
|
|
365
|
-
|
|
366
|
-
else
|
|
367
|
-
return false;
|
|
393
|
+
if (value) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
|
|
394
|
+
else return false;
|
|
368
395
|
},
|
|
369
396
|
isDateBetween(start, end, dateMeta) {
|
|
370
397
|
let between = false;
|
|
398
|
+
|
|
371
399
|
if (start && end) {
|
|
372
400
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
401
|
+
|
|
373
402
|
return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();
|
|
374
403
|
}
|
|
375
404
|
|
|
@@ -377,11 +406,13 @@ var script = {
|
|
|
377
406
|
},
|
|
378
407
|
getFirstDayOfMonthIndex(month, year) {
|
|
379
408
|
let day = new Date();
|
|
409
|
+
|
|
380
410
|
day.setDate(1);
|
|
381
411
|
day.setMonth(month);
|
|
382
412
|
day.setFullYear(year);
|
|
383
413
|
|
|
384
414
|
let dayIndex = day.getDay() + this.sundayIndex;
|
|
415
|
+
|
|
385
416
|
return dayIndex >= 7 ? dayIndex - 7 : dayIndex;
|
|
386
417
|
},
|
|
387
418
|
getDaysCountInMonth(month, year) {
|
|
@@ -389,6 +420,7 @@ var script = {
|
|
|
389
420
|
},
|
|
390
421
|
getDaysCountInPrevMonth(month, year) {
|
|
391
422
|
let prev = this.getPreviousMonthAndYear(month, year);
|
|
423
|
+
|
|
392
424
|
return this.getDaysCountInMonth(prev.month, prev.year);
|
|
393
425
|
},
|
|
394
426
|
getPreviousMonthAndYear(month, year) {
|
|
@@ -397,13 +429,12 @@ var script = {
|
|
|
397
429
|
if (month === 0) {
|
|
398
430
|
m = 11;
|
|
399
431
|
y = year - 1;
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
432
|
+
} else {
|
|
402
433
|
m = month - 1;
|
|
403
434
|
y = year;
|
|
404
435
|
}
|
|
405
436
|
|
|
406
|
-
return {
|
|
437
|
+
return { month: m, year: y };
|
|
407
438
|
},
|
|
408
439
|
getNextMonthAndYear(month, year) {
|
|
409
440
|
let m, y;
|
|
@@ -411,13 +442,12 @@ var script = {
|
|
|
411
442
|
if (month === 11) {
|
|
412
443
|
m = 0;
|
|
413
444
|
y = year + 1;
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
445
|
+
} else {
|
|
416
446
|
m = month + 1;
|
|
417
447
|
y = year;
|
|
418
448
|
}
|
|
419
449
|
|
|
420
|
-
return {
|
|
450
|
+
return { month: m, year: y };
|
|
421
451
|
},
|
|
422
452
|
daylightSavingAdjust(date) {
|
|
423
453
|
if (!date) {
|
|
@@ -444,12 +474,10 @@ var script = {
|
|
|
444
474
|
if (this.minDate) {
|
|
445
475
|
if (this.minDate.getFullYear() > year) {
|
|
446
476
|
validMin = false;
|
|
447
|
-
}
|
|
448
|
-
else if (this.minDate.getFullYear() === year) {
|
|
477
|
+
} else if (this.minDate.getFullYear() === year) {
|
|
449
478
|
if (this.minDate.getMonth() > month) {
|
|
450
479
|
validMin = false;
|
|
451
|
-
}
|
|
452
|
-
else if (this.minDate.getMonth() === month) {
|
|
480
|
+
} else if (this.minDate.getMonth() === month) {
|
|
453
481
|
if (this.minDate.getDate() > day) {
|
|
454
482
|
validMin = false;
|
|
455
483
|
}
|
|
@@ -460,12 +488,10 @@ var script = {
|
|
|
460
488
|
if (this.maxDate) {
|
|
461
489
|
if (this.maxDate.getFullYear() < year) {
|
|
462
490
|
validMax = false;
|
|
463
|
-
}
|
|
464
|
-
else if (this.maxDate.getFullYear() === year) {
|
|
491
|
+
} else if (this.maxDate.getFullYear() === year) {
|
|
465
492
|
if (this.maxDate.getMonth() < month) {
|
|
466
493
|
validMax = false;
|
|
467
|
-
}
|
|
468
|
-
else if (this.maxDate.getMonth() === month) {
|
|
494
|
+
} else if (this.maxDate.getMonth() === month) {
|
|
469
495
|
if (this.maxDate.getDate() < day) {
|
|
470
496
|
validMax = false;
|
|
471
497
|
}
|
|
@@ -474,11 +500,11 @@ var script = {
|
|
|
474
500
|
}
|
|
475
501
|
|
|
476
502
|
if (this.disabledDates) {
|
|
477
|
-
validDate = !this.isDateDisabled(day,month,year);
|
|
503
|
+
validDate = !this.isDateDisabled(day, month, year);
|
|
478
504
|
}
|
|
479
505
|
|
|
480
506
|
if (this.disabledDays) {
|
|
481
|
-
validDay = !this.isDayDisabled(day,month,year);
|
|
507
|
+
validDay = !this.isDayDisabled(day, month, year);
|
|
482
508
|
}
|
|
483
509
|
|
|
484
510
|
return validMin && validMax && validDate && validDay;
|
|
@@ -487,10 +513,8 @@ var script = {
|
|
|
487
513
|
el.setAttribute(this.attributeSelector, '');
|
|
488
514
|
|
|
489
515
|
if (this.autoZIndex) {
|
|
490
|
-
if (this.touchUI)
|
|
491
|
-
|
|
492
|
-
else
|
|
493
|
-
utils.ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
|
|
516
|
+
if (this.touchUI) utils.ZIndexUtils.set('modal', el, this.baseZIndex || this.$primevue.config.zIndex.modal);
|
|
517
|
+
else utils.ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
|
|
494
518
|
}
|
|
495
519
|
|
|
496
520
|
this.alignOverlay();
|
|
@@ -520,14 +544,14 @@ var script = {
|
|
|
520
544
|
this.overlay = null;
|
|
521
545
|
},
|
|
522
546
|
onPrevButtonClick(event) {
|
|
523
|
-
if(this.showOtherMonths) {
|
|
524
|
-
this.navigationState = {backward: true, button: true};
|
|
547
|
+
if (this.showOtherMonths) {
|
|
548
|
+
this.navigationState = { backward: true, button: true };
|
|
525
549
|
this.navBackward(event);
|
|
526
550
|
}
|
|
527
551
|
},
|
|
528
552
|
onNextButtonClick(event) {
|
|
529
|
-
if(this.showOtherMonths) {
|
|
530
|
-
this.navigationState = {backward: false, button: true};
|
|
553
|
+
if (this.showOtherMonths) {
|
|
554
|
+
this.navigationState = { backward: false, button: true };
|
|
531
555
|
this.navForward(event);
|
|
532
556
|
}
|
|
533
557
|
},
|
|
@@ -540,24 +564,20 @@ var script = {
|
|
|
540
564
|
|
|
541
565
|
if (this.currentView === 'month') {
|
|
542
566
|
this.decrementYear();
|
|
543
|
-
}
|
|
544
|
-
else if (this.currentView === 'year') {
|
|
567
|
+
} else if (this.currentView === 'year') {
|
|
545
568
|
this.decrementDecade();
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
569
|
+
} else {
|
|
548
570
|
if (event.shiftKey) {
|
|
549
571
|
this.decrementYear();
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
572
|
+
} else {
|
|
552
573
|
if (this.currentMonth === 0) {
|
|
553
574
|
this.currentMonth = 11;
|
|
554
575
|
this.decrementYear();
|
|
555
|
-
}
|
|
556
|
-
else {
|
|
576
|
+
} else {
|
|
557
577
|
this.currentMonth--;
|
|
558
578
|
}
|
|
559
579
|
|
|
560
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
580
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
561
581
|
}
|
|
562
582
|
}
|
|
563
583
|
},
|
|
@@ -570,24 +590,20 @@ var script = {
|
|
|
570
590
|
|
|
571
591
|
if (this.currentView === 'month') {
|
|
572
592
|
this.incrementYear();
|
|
573
|
-
}
|
|
574
|
-
else if (this.currentView === 'year') {
|
|
593
|
+
} else if (this.currentView === 'year') {
|
|
575
594
|
this.incrementDecade();
|
|
576
|
-
}
|
|
577
|
-
else {
|
|
595
|
+
} else {
|
|
578
596
|
if (event.shiftKey) {
|
|
579
597
|
this.incrementYear();
|
|
580
|
-
}
|
|
581
|
-
else {
|
|
598
|
+
} else {
|
|
582
599
|
if (this.currentMonth === 11) {
|
|
583
600
|
this.currentMonth = 0;
|
|
584
601
|
this.incrementYear();
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
602
|
+
} else {
|
|
587
603
|
this.currentMonth++;
|
|
588
604
|
}
|
|
589
605
|
|
|
590
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
606
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
591
607
|
}
|
|
592
608
|
}
|
|
593
609
|
},
|
|
@@ -622,10 +638,8 @@ var script = {
|
|
|
622
638
|
if (this.hourFormat === '12') {
|
|
623
639
|
this.pm = currentHour > 11;
|
|
624
640
|
|
|
625
|
-
if (currentHour >= 12)
|
|
626
|
-
|
|
627
|
-
else
|
|
628
|
-
currentHour = (currentHour == 0) ? 12 : currentHour;
|
|
641
|
+
if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
|
|
642
|
+
else currentHour = currentHour == 0 ? 12 : currentHour;
|
|
629
643
|
}
|
|
630
644
|
|
|
631
645
|
this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
|
|
@@ -639,6 +653,7 @@ var script = {
|
|
|
639
653
|
this.overlayVisible = false;
|
|
640
654
|
}
|
|
641
655
|
};
|
|
656
|
+
|
|
642
657
|
document.addEventListener('mousedown', this.outsideClickListener);
|
|
643
658
|
}
|
|
644
659
|
},
|
|
@@ -671,6 +686,7 @@ var script = {
|
|
|
671
686
|
this.overlayVisible = false;
|
|
672
687
|
}
|
|
673
688
|
};
|
|
689
|
+
|
|
674
690
|
window.addEventListener('resize', this.resizeListener);
|
|
675
691
|
}
|
|
676
692
|
},
|
|
@@ -681,27 +697,27 @@ var script = {
|
|
|
681
697
|
}
|
|
682
698
|
},
|
|
683
699
|
isOutsideClicked(event) {
|
|
684
|
-
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) ||
|
|
685
|
-
this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
700
|
+
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
686
701
|
},
|
|
687
702
|
isNavIconClicked(event) {
|
|
688
|
-
return (
|
|
689
|
-
|
|
703
|
+
return (
|
|
704
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-prev') ||
|
|
705
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-prev-icon') ||
|
|
706
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-next') ||
|
|
707
|
+
utils.DomHandler.hasClass(event.target, 'p-datepicker-next-icon')
|
|
708
|
+
);
|
|
690
709
|
},
|
|
691
710
|
alignOverlay() {
|
|
692
711
|
if (this.touchUI) {
|
|
693
712
|
this.enableModality();
|
|
694
|
-
}
|
|
695
|
-
else if (this.overlay) {
|
|
713
|
+
} else if (this.overlay) {
|
|
696
714
|
if (this.appendTo === 'self' || this.inline) {
|
|
697
715
|
utils.DomHandler.relativePosition(this.overlay, this.$el);
|
|
698
|
-
}
|
|
699
|
-
else {
|
|
716
|
+
} else {
|
|
700
717
|
if (this.view === 'date') {
|
|
701
718
|
this.overlay.style.width = utils.DomHandler.getOuterWidth(this.overlay) + 'px';
|
|
702
719
|
this.overlay.style.minWidth = utils.DomHandler.getOuterWidth(this.$el) + 'px';
|
|
703
|
-
}
|
|
704
|
-
else {
|
|
720
|
+
} else {
|
|
705
721
|
this.overlay.style.width = utils.DomHandler.getOuterWidth(this.$el) + 'px';
|
|
706
722
|
}
|
|
707
723
|
|
|
@@ -714,8 +730,7 @@ var script = {
|
|
|
714
730
|
if (!this.overlayVisible) {
|
|
715
731
|
this.input.focus();
|
|
716
732
|
this.overlayVisible = true;
|
|
717
|
-
}
|
|
718
|
-
else {
|
|
733
|
+
} else {
|
|
719
734
|
this.overlayVisible = false;
|
|
720
735
|
}
|
|
721
736
|
}
|
|
@@ -735,41 +750,42 @@ var script = {
|
|
|
735
750
|
if (this.disabledDays) {
|
|
736
751
|
let weekday = new Date(year, month, day);
|
|
737
752
|
let weekdayNumber = weekday.getDay();
|
|
753
|
+
|
|
738
754
|
return this.disabledDays.indexOf(weekdayNumber) !== -1;
|
|
739
755
|
}
|
|
756
|
+
|
|
740
757
|
return false;
|
|
741
758
|
},
|
|
742
759
|
onMonthDropdownChange(value) {
|
|
743
760
|
this.currentMonth = parseInt(value);
|
|
744
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
761
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
745
762
|
},
|
|
746
763
|
onYearDropdownChange(value) {
|
|
747
764
|
this.currentYear = parseInt(value);
|
|
748
|
-
this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
765
|
+
this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
749
766
|
},
|
|
750
767
|
onDateSelect(event, dateMeta) {
|
|
751
768
|
if (this.disabled || !dateMeta.selectable) {
|
|
752
769
|
return;
|
|
753
770
|
}
|
|
754
771
|
|
|
755
|
-
utils.DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(cell => cell.tabIndex = -1);
|
|
772
|
+
utils.DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach((cell) => (cell.tabIndex = -1));
|
|
756
773
|
|
|
757
774
|
if (event) {
|
|
758
775
|
event.currentTarget.focus();
|
|
759
776
|
}
|
|
760
777
|
|
|
761
778
|
if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
|
|
762
|
-
let newValue = this.modelValue.filter(date => !this.isDateEquals(date, dateMeta));
|
|
779
|
+
let newValue = this.modelValue.filter((date) => !this.isDateEquals(date, dateMeta));
|
|
780
|
+
|
|
763
781
|
this.updateModel(newValue);
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
782
|
+
} else {
|
|
766
783
|
if (this.shouldSelectDate(dateMeta)) {
|
|
767
784
|
if (dateMeta.otherMonth) {
|
|
768
785
|
this.currentMonth = dateMeta.month;
|
|
769
786
|
this.currentYear = dateMeta.year;
|
|
770
787
|
this.selectDate(dateMeta);
|
|
771
|
-
}
|
|
772
|
-
else {
|
|
788
|
+
} else {
|
|
773
789
|
this.selectDate(dateMeta);
|
|
774
790
|
}
|
|
775
791
|
}
|
|
@@ -786,10 +802,8 @@ var script = {
|
|
|
786
802
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
787
803
|
|
|
788
804
|
if (this.showTime) {
|
|
789
|
-
if (this.hourFormat === '12' && this.pm && this.currentHour != 12)
|
|
790
|
-
|
|
791
|
-
else
|
|
792
|
-
date.setHours(this.currentHour);
|
|
805
|
+
if (this.hourFormat === '12' && this.pm && this.currentHour != 12) date.setHours(this.currentHour + 12);
|
|
806
|
+
else date.setHours(this.currentHour);
|
|
793
807
|
|
|
794
808
|
date.setMinutes(this.currentMinute);
|
|
795
809
|
date.setSeconds(this.currentSecond);
|
|
@@ -813,25 +827,22 @@ var script = {
|
|
|
813
827
|
|
|
814
828
|
if (this.isSingleSelection()) {
|
|
815
829
|
modelVal = date;
|
|
816
|
-
}
|
|
817
|
-
else if (this.isMultipleSelection()) {
|
|
830
|
+
} else if (this.isMultipleSelection()) {
|
|
818
831
|
modelVal = this.modelValue ? [...this.modelValue, date] : [date];
|
|
819
|
-
}
|
|
820
|
-
else if (this.isRangeSelection()) {
|
|
832
|
+
} else if (this.isRangeSelection()) {
|
|
821
833
|
if (this.modelValue && this.modelValue.length) {
|
|
822
834
|
let startDate = this.modelValue[0];
|
|
823
835
|
let endDate = this.modelValue[1];
|
|
824
836
|
|
|
825
837
|
if (!endDate && date.getTime() >= startDate.getTime()) {
|
|
826
838
|
endDate = date;
|
|
827
|
-
}
|
|
828
|
-
else {
|
|
839
|
+
} else {
|
|
829
840
|
startDate = date;
|
|
830
841
|
endDate = null;
|
|
831
842
|
}
|
|
843
|
+
|
|
832
844
|
modelVal = [startDate, endDate];
|
|
833
|
-
}
|
|
834
|
-
else {
|
|
845
|
+
} else {
|
|
835
846
|
modelVal = [date, null];
|
|
836
847
|
}
|
|
837
848
|
}
|
|
@@ -845,16 +856,15 @@ var script = {
|
|
|
845
856
|
this.overlayVisible = false;
|
|
846
857
|
}, 150);
|
|
847
858
|
}
|
|
859
|
+
|
|
848
860
|
this.$emit('date-select', date);
|
|
849
861
|
},
|
|
850
862
|
updateModel(value) {
|
|
851
863
|
this.$emit('update:modelValue', value);
|
|
852
864
|
},
|
|
853
865
|
shouldSelectDate() {
|
|
854
|
-
if (this.isMultipleSelection())
|
|
855
|
-
|
|
856
|
-
else
|
|
857
|
-
return true;
|
|
866
|
+
if (this.isMultipleSelection()) return this.maxDateCount != null ? this.maxDateCount > (this.modelValue ? this.modelValue.length : 0) : true;
|
|
867
|
+
else return true;
|
|
858
868
|
},
|
|
859
869
|
isSingleSelection() {
|
|
860
870
|
return this.selectionMode === 'single';
|
|
@@ -871,33 +881,34 @@ var script = {
|
|
|
871
881
|
}
|
|
872
882
|
|
|
873
883
|
let formattedValue = '';
|
|
884
|
+
|
|
874
885
|
if (value) {
|
|
875
886
|
try {
|
|
876
887
|
if (this.isSingleSelection()) {
|
|
877
888
|
formattedValue = this.formatDateTime(value);
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
for(let i = 0; i < value.length; i++) {
|
|
889
|
+
} else if (this.isMultipleSelection()) {
|
|
890
|
+
for (let i = 0; i < value.length; i++) {
|
|
881
891
|
let dateAsString = this.formatDateTime(value[i]);
|
|
892
|
+
|
|
882
893
|
formattedValue += dateAsString;
|
|
883
|
-
|
|
894
|
+
|
|
895
|
+
if (i !== value.length - 1) {
|
|
884
896
|
formattedValue += ', ';
|
|
885
897
|
}
|
|
886
898
|
}
|
|
887
|
-
}
|
|
888
|
-
else if (this.isRangeSelection()) {
|
|
899
|
+
} else if (this.isRangeSelection()) {
|
|
889
900
|
if (value && value.length) {
|
|
890
901
|
let startDate = value[0];
|
|
891
902
|
let endDate = value[1];
|
|
892
903
|
|
|
893
904
|
formattedValue = this.formatDateTime(startDate);
|
|
905
|
+
|
|
894
906
|
if (endDate) {
|
|
895
907
|
formattedValue += ' - ' + this.formatDateTime(endDate);
|
|
896
908
|
}
|
|
897
909
|
}
|
|
898
910
|
}
|
|
899
|
-
}
|
|
900
|
-
catch(err) {
|
|
911
|
+
} catch (err) {
|
|
901
912
|
formattedValue = value;
|
|
902
913
|
}
|
|
903
914
|
}
|
|
@@ -906,13 +917,14 @@ var script = {
|
|
|
906
917
|
},
|
|
907
918
|
formatDateTime(date) {
|
|
908
919
|
let formattedValue = null;
|
|
920
|
+
|
|
909
921
|
if (date) {
|
|
910
|
-
if(this.timeOnly) {
|
|
922
|
+
if (this.timeOnly) {
|
|
911
923
|
formattedValue = this.formatTime(date);
|
|
912
|
-
}
|
|
913
|
-
else {
|
|
924
|
+
} else {
|
|
914
925
|
formattedValue = this.formatDate(date, this.datePattern);
|
|
915
|
-
|
|
926
|
+
|
|
927
|
+
if (this.showTime) {
|
|
916
928
|
formattedValue += ' ' + this.formatTime(date);
|
|
917
929
|
}
|
|
918
930
|
}
|
|
@@ -926,32 +938,38 @@ var script = {
|
|
|
926
938
|
}
|
|
927
939
|
|
|
928
940
|
let iFormat;
|
|
941
|
+
|
|
929
942
|
const lookAhead = (match) => {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
943
|
+
const matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
|
|
944
|
+
|
|
945
|
+
if (matches) {
|
|
946
|
+
iFormat++;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return matches;
|
|
950
|
+
},
|
|
936
951
|
formatNumber = (match, value, len) => {
|
|
937
952
|
let num = '' + value;
|
|
953
|
+
|
|
938
954
|
if (lookAhead(match)) {
|
|
939
955
|
while (num.length < len) {
|
|
940
956
|
num = '0' + num;
|
|
941
957
|
}
|
|
942
958
|
}
|
|
959
|
+
|
|
943
960
|
return num;
|
|
944
961
|
},
|
|
945
962
|
formatName = (match, value, shortNames, longNames) => {
|
|
946
|
-
return
|
|
963
|
+
return lookAhead(match) ? longNames[value] : shortNames[value];
|
|
947
964
|
};
|
|
965
|
+
|
|
948
966
|
let output = '';
|
|
949
967
|
let literal = false;
|
|
950
968
|
|
|
951
969
|
if (date) {
|
|
952
970
|
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
|
953
971
|
if (literal) {
|
|
954
|
-
if (format.charAt(iFormat) === '
|
|
972
|
+
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
|
955
973
|
literal = false;
|
|
956
974
|
} else {
|
|
957
975
|
output += format.charAt(iFormat);
|
|
@@ -965,16 +983,13 @@ var script = {
|
|
|
965
983
|
output += formatName('D', date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
|
|
966
984
|
break;
|
|
967
985
|
case 'o':
|
|
968
|
-
output += formatNumber('o',
|
|
969
|
-
Math.round((
|
|
970
|
-
new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() -
|
|
971
|
-
new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
|
986
|
+
output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
|
972
987
|
break;
|
|
973
988
|
case 'm':
|
|
974
989
|
output += formatNumber('m', date.getMonth() + 1, 2);
|
|
975
990
|
break;
|
|
976
991
|
case 'M':
|
|
977
|
-
output += formatName('M',date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
992
|
+
output += formatName('M', date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
978
993
|
break;
|
|
979
994
|
case 'y':
|
|
980
995
|
output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);
|
|
@@ -985,12 +1000,13 @@ var script = {
|
|
|
985
1000
|
case '!':
|
|
986
1001
|
output += date.getTime() * 10000 + this.ticksTo1970;
|
|
987
1002
|
break;
|
|
988
|
-
case '
|
|
989
|
-
if (lookAhead('
|
|
990
|
-
output += '
|
|
1003
|
+
case "'":
|
|
1004
|
+
if (lookAhead("'")) {
|
|
1005
|
+
output += "'";
|
|
991
1006
|
} else {
|
|
992
1007
|
literal = true;
|
|
993
1008
|
}
|
|
1009
|
+
|
|
994
1010
|
break;
|
|
995
1011
|
default:
|
|
996
1012
|
output += format.charAt(iFormat);
|
|
@@ -998,6 +1014,7 @@ var script = {
|
|
|
998
1014
|
}
|
|
999
1015
|
}
|
|
1000
1016
|
}
|
|
1017
|
+
|
|
1001
1018
|
return output;
|
|
1002
1019
|
},
|
|
1003
1020
|
formatTime(date) {
|
|
@@ -1015,21 +1032,21 @@ var script = {
|
|
|
1015
1032
|
}
|
|
1016
1033
|
|
|
1017
1034
|
if (this.hourFormat === '12') {
|
|
1018
|
-
output += hours === 0 ? 12 :
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
output += (hours < 10) ? '0' + hours : hours;
|
|
1035
|
+
output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;
|
|
1036
|
+
} else {
|
|
1037
|
+
output += hours < 10 ? '0' + hours : hours;
|
|
1022
1038
|
}
|
|
1039
|
+
|
|
1023
1040
|
output += ':';
|
|
1024
|
-
output +=
|
|
1041
|
+
output += minutes < 10 ? '0' + minutes : minutes;
|
|
1025
1042
|
|
|
1026
1043
|
if (this.showSeconds) {
|
|
1027
1044
|
output += ':';
|
|
1028
|
-
output +=
|
|
1045
|
+
output += seconds < 10 ? '0' + seconds : seconds;
|
|
1029
1046
|
}
|
|
1030
1047
|
|
|
1031
1048
|
if (this.hourFormat === '12') {
|
|
1032
|
-
output += date.getHours() > 11 ?
|
|
1049
|
+
output += date.getHours() > 11 ? ` ${this.$primevue.config.locale.pm}` : ` ${this.$primevue.config.locale.am}`;
|
|
1033
1050
|
}
|
|
1034
1051
|
|
|
1035
1052
|
return output;
|
|
@@ -1072,44 +1089,39 @@ var script = {
|
|
|
1072
1089
|
this.clearTimePickerTimer();
|
|
1073
1090
|
},
|
|
1074
1091
|
repeat(event, interval, type, direction) {
|
|
1075
|
-
let i = interval||500;
|
|
1092
|
+
let i = interval || 500;
|
|
1076
1093
|
|
|
1077
1094
|
this.clearTimePickerTimer();
|
|
1078
1095
|
this.timePickerTimer = setTimeout(() => {
|
|
1079
1096
|
this.repeat(event, 100, type, direction);
|
|
1080
1097
|
}, i);
|
|
1081
1098
|
|
|
1082
|
-
switch(type) {
|
|
1099
|
+
switch (type) {
|
|
1083
1100
|
case 0:
|
|
1084
|
-
if (direction === 1)
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
this.decrementHour(event);
|
|
1088
|
-
break;
|
|
1101
|
+
if (direction === 1) this.incrementHour(event);
|
|
1102
|
+
else this.decrementHour(event);
|
|
1103
|
+
break;
|
|
1089
1104
|
|
|
1090
1105
|
case 1:
|
|
1091
|
-
if (direction === 1)
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
this.decrementMinute(event);
|
|
1095
|
-
break;
|
|
1106
|
+
if (direction === 1) this.incrementMinute(event);
|
|
1107
|
+
else this.decrementMinute(event);
|
|
1108
|
+
break;
|
|
1096
1109
|
|
|
1097
1110
|
case 2:
|
|
1098
|
-
if (direction === 1)
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
this.decrementSecond(event);
|
|
1102
|
-
break;
|
|
1111
|
+
if (direction === 1) this.incrementSecond(event);
|
|
1112
|
+
else this.decrementSecond(event);
|
|
1113
|
+
break;
|
|
1103
1114
|
}
|
|
1104
1115
|
},
|
|
1105
1116
|
convertTo24Hour(hours, pm) {
|
|
1106
1117
|
if (this.hourFormat == '12') {
|
|
1107
1118
|
if (hours === 12) {
|
|
1108
|
-
return
|
|
1119
|
+
return pm ? 12 : 0;
|
|
1109
1120
|
} else {
|
|
1110
|
-
return
|
|
1121
|
+
return pm ? hours + 12 : hours;
|
|
1111
1122
|
}
|
|
1112
1123
|
}
|
|
1124
|
+
|
|
1113
1125
|
return hours;
|
|
1114
1126
|
},
|
|
1115
1127
|
validateTime(hour, minute, second, pm) {
|
|
@@ -1119,18 +1131,23 @@ var script = {
|
|
|
1119
1131
|
if (this.isRangeSelection()) {
|
|
1120
1132
|
value = this.modelValue[1] || this.modelValue[0];
|
|
1121
1133
|
}
|
|
1134
|
+
|
|
1122
1135
|
if (this.isMultipleSelection()) {
|
|
1123
1136
|
value = this.modelValue[this.modelValue.length - 1];
|
|
1124
1137
|
}
|
|
1138
|
+
|
|
1125
1139
|
const valueDateString = value ? value.toDateString() : null;
|
|
1140
|
+
|
|
1126
1141
|
if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) {
|
|
1127
1142
|
if (this.minDate.getHours() > convertedHour) {
|
|
1128
1143
|
return false;
|
|
1129
1144
|
}
|
|
1145
|
+
|
|
1130
1146
|
if (this.minDate.getHours() === convertedHour) {
|
|
1131
1147
|
if (this.minDate.getMinutes() > minute) {
|
|
1132
1148
|
return false;
|
|
1133
1149
|
}
|
|
1150
|
+
|
|
1134
1151
|
if (this.minDate.getMinutes() === minute) {
|
|
1135
1152
|
if (this.minDate.getSeconds() > second) {
|
|
1136
1153
|
return false;
|
|
@@ -1143,10 +1160,12 @@ var script = {
|
|
|
1143
1160
|
if (this.maxDate.getHours() < convertedHour) {
|
|
1144
1161
|
return false;
|
|
1145
1162
|
}
|
|
1163
|
+
|
|
1146
1164
|
if (this.maxDate.getHours() === convertedHour) {
|
|
1147
1165
|
if (this.maxDate.getMinutes() < minute) {
|
|
1148
1166
|
return false;
|
|
1149
1167
|
}
|
|
1168
|
+
|
|
1150
1169
|
if (this.maxDate.getMinutes() === minute) {
|
|
1151
1170
|
if (this.maxDate.getSeconds() < second) {
|
|
1152
1171
|
return false;
|
|
@@ -1154,6 +1173,7 @@ var script = {
|
|
|
1154
1173
|
}
|
|
1155
1174
|
}
|
|
1156
1175
|
}
|
|
1176
|
+
|
|
1157
1177
|
return true;
|
|
1158
1178
|
},
|
|
1159
1179
|
incrementHour(event) {
|
|
@@ -1161,51 +1181,58 @@ var script = {
|
|
|
1161
1181
|
let newHour = this.currentHour + this.stepHour;
|
|
1162
1182
|
let newPM = this.pm;
|
|
1163
1183
|
|
|
1164
|
-
if (this.hourFormat == '24')
|
|
1165
|
-
newHour = (newHour >= 24) ? (newHour - 24) : newHour;
|
|
1184
|
+
if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour;
|
|
1166
1185
|
else if (this.hourFormat == '12') {
|
|
1167
1186
|
// Before the AM/PM break, now after
|
|
1168
1187
|
if (prevHour < 12 && newHour > 11) {
|
|
1169
|
-
newPM= !this.pm;
|
|
1188
|
+
newPM = !this.pm;
|
|
1170
1189
|
}
|
|
1171
|
-
|
|
1190
|
+
|
|
1191
|
+
newHour = newHour >= 13 ? newHour - 12 : newHour;
|
|
1172
1192
|
}
|
|
1173
1193
|
|
|
1174
1194
|
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
|
|
1175
1195
|
this.currentHour = newHour;
|
|
1176
1196
|
this.pm = newPM;
|
|
1177
1197
|
}
|
|
1198
|
+
|
|
1178
1199
|
event.preventDefault();
|
|
1179
1200
|
},
|
|
1180
1201
|
decrementHour(event) {
|
|
1181
1202
|
let newHour = this.currentHour - this.stepHour;
|
|
1182
1203
|
let newPM = this.pm;
|
|
1183
1204
|
|
|
1184
|
-
if (this.hourFormat == '24')
|
|
1185
|
-
newHour = (newHour < 0) ? (24 + newHour) : newHour;
|
|
1205
|
+
if (this.hourFormat == '24') newHour = newHour < 0 ? 24 + newHour : newHour;
|
|
1186
1206
|
else if (this.hourFormat == '12') {
|
|
1187
1207
|
// If we were at noon/midnight, then switch
|
|
1188
1208
|
if (this.currentHour === 12) {
|
|
1189
1209
|
newPM = !this.pm;
|
|
1190
1210
|
}
|
|
1191
|
-
|
|
1211
|
+
|
|
1212
|
+
newHour = newHour <= 0 ? 12 + newHour : newHour;
|
|
1192
1213
|
}
|
|
1214
|
+
|
|
1193
1215
|
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
|
|
1194
1216
|
this.currentHour = newHour;
|
|
1195
1217
|
this.pm = newPM;
|
|
1196
1218
|
}
|
|
1219
|
+
|
|
1197
1220
|
event.preventDefault();
|
|
1198
1221
|
},
|
|
1199
1222
|
incrementMinute(event) {
|
|
1200
1223
|
let newMinute = this.currentMinute + this.stepMinute;
|
|
1224
|
+
|
|
1201
1225
|
if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
|
|
1202
|
-
this.currentMinute =
|
|
1226
|
+
this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute;
|
|
1203
1227
|
}
|
|
1228
|
+
|
|
1204
1229
|
event.preventDefault();
|
|
1205
1230
|
},
|
|
1206
1231
|
decrementMinute(event) {
|
|
1207
1232
|
let newMinute = this.currentMinute - this.stepMinute;
|
|
1208
|
-
|
|
1233
|
+
|
|
1234
|
+
newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
|
|
1235
|
+
|
|
1209
1236
|
if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
|
|
1210
1237
|
this.currentMinute = newMinute;
|
|
1211
1238
|
}
|
|
@@ -1214,15 +1241,18 @@ var script = {
|
|
|
1214
1241
|
},
|
|
1215
1242
|
incrementSecond(event) {
|
|
1216
1243
|
let newSecond = this.currentSecond + this.stepSecond;
|
|
1244
|
+
|
|
1217
1245
|
if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
|
|
1218
|
-
this.currentSecond =
|
|
1246
|
+
this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond;
|
|
1219
1247
|
}
|
|
1220
1248
|
|
|
1221
1249
|
event.preventDefault();
|
|
1222
1250
|
},
|
|
1223
1251
|
decrementSecond(event) {
|
|
1224
1252
|
let newSecond = this.currentSecond - this.stepSecond;
|
|
1225
|
-
|
|
1253
|
+
|
|
1254
|
+
newSecond = newSecond < 0 ? 60 + newSecond : newSecond;
|
|
1255
|
+
|
|
1226
1256
|
if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
|
|
1227
1257
|
this.currentSecond = newSecond;
|
|
1228
1258
|
}
|
|
@@ -1236,18 +1266,17 @@ var script = {
|
|
|
1236
1266
|
if (this.isRangeSelection()) {
|
|
1237
1267
|
value = this.modelValue[1] || this.modelValue[0];
|
|
1238
1268
|
}
|
|
1269
|
+
|
|
1239
1270
|
if (this.isMultipleSelection()) {
|
|
1240
1271
|
value = this.modelValue[this.modelValue.length - 1];
|
|
1241
1272
|
}
|
|
1273
|
+
|
|
1242
1274
|
value = value ? new Date(value.getTime()) : new Date();
|
|
1243
1275
|
|
|
1244
1276
|
if (this.hourFormat == '12') {
|
|
1245
|
-
if (this.currentHour === 12)
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
|
|
1249
|
-
}
|
|
1250
|
-
else {
|
|
1277
|
+
if (this.currentHour === 12) value.setHours(this.pm ? 12 : 0);
|
|
1278
|
+
else value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
|
|
1279
|
+
} else {
|
|
1251
1280
|
value.setHours(this.currentHour);
|
|
1252
1281
|
}
|
|
1253
1282
|
|
|
@@ -1255,19 +1284,17 @@ var script = {
|
|
|
1255
1284
|
value.setSeconds(this.currentSecond);
|
|
1256
1285
|
|
|
1257
1286
|
if (this.isRangeSelection()) {
|
|
1258
|
-
if (this.modelValue[1])
|
|
1259
|
-
|
|
1260
|
-
else
|
|
1261
|
-
value = [value, null];
|
|
1287
|
+
if (this.modelValue[1]) value = [this.modelValue[0], value];
|
|
1288
|
+
else value = [value, null];
|
|
1262
1289
|
}
|
|
1263
1290
|
|
|
1264
|
-
if (this.isMultipleSelection()){
|
|
1291
|
+
if (this.isMultipleSelection()) {
|
|
1265
1292
|
value = [...this.modelValue.slice(0, -1), value];
|
|
1266
1293
|
}
|
|
1267
1294
|
|
|
1268
1295
|
this.updateModel(value);
|
|
1269
1296
|
this.$emit('date-select', value);
|
|
1270
|
-
setTimeout(() => this.timePickerChange = false, 0);
|
|
1297
|
+
setTimeout(() => (this.timePickerChange = false), 0);
|
|
1271
1298
|
},
|
|
1272
1299
|
toggleAMPM(event) {
|
|
1273
1300
|
this.pm = !this.pm;
|
|
@@ -1281,24 +1308,22 @@ var script = {
|
|
|
1281
1308
|
},
|
|
1282
1309
|
onMonthSelect(event, index) {
|
|
1283
1310
|
if (this.view === 'month') {
|
|
1284
|
-
this.onDateSelect(event, {year: this.currentYear, month: index, day: 1, selectable: true});
|
|
1285
|
-
}
|
|
1286
|
-
else {
|
|
1311
|
+
this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
|
|
1312
|
+
} else {
|
|
1287
1313
|
this.currentMonth = index;
|
|
1288
1314
|
this.currentView = 'date';
|
|
1289
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
1315
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
1290
1316
|
}
|
|
1291
1317
|
|
|
1292
1318
|
setTimeout(this.updateFocus, 0);
|
|
1293
1319
|
},
|
|
1294
1320
|
onYearSelect(event, year) {
|
|
1295
1321
|
if (this.view === 'year') {
|
|
1296
|
-
this.onDateSelect(event, {year: year, month: 0, day: 1, selectable: true});
|
|
1297
|
-
}
|
|
1298
|
-
else {
|
|
1322
|
+
this.onDateSelect(event, { year: year, month: 0, day: 1, selectable: true });
|
|
1323
|
+
} else {
|
|
1299
1324
|
this.currentYear = year;
|
|
1300
1325
|
this.currentView = 'month';
|
|
1301
|
-
this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
1326
|
+
this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
1302
1327
|
}
|
|
1303
1328
|
|
|
1304
1329
|
setTimeout(this.updateFocus, 0);
|
|
@@ -1312,6 +1337,7 @@ var script = {
|
|
|
1312
1337
|
this.maskClickListener = () => {
|
|
1313
1338
|
this.overlayVisible = false;
|
|
1314
1339
|
};
|
|
1340
|
+
|
|
1315
1341
|
this.mask.addEventListener('click', this.maskClickListener);
|
|
1316
1342
|
|
|
1317
1343
|
document.body.appendChild(this.mask);
|
|
@@ -1334,9 +1360,11 @@ var script = {
|
|
|
1334
1360
|
|
|
1335
1361
|
let bodyChildren = document.body.children;
|
|
1336
1362
|
let hasBlockerMasks;
|
|
1363
|
+
|
|
1337
1364
|
for (let i = 0; i < bodyChildren.length; i++) {
|
|
1338
1365
|
let bodyChild = bodyChildren[i];
|
|
1339
|
-
|
|
1366
|
+
|
|
1367
|
+
if (utils.DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {
|
|
1340
1368
|
hasBlockerMasks = true;
|
|
1341
1369
|
break;
|
|
1342
1370
|
}
|
|
@@ -1348,6 +1376,7 @@ var script = {
|
|
|
1348
1376
|
},
|
|
1349
1377
|
updateCurrentMetaData() {
|
|
1350
1378
|
const viewDate = this.viewDate;
|
|
1379
|
+
|
|
1351
1380
|
this.currentMonth = viewDate.getMonth();
|
|
1352
1381
|
this.currentYear = viewDate.getFullYear();
|
|
1353
1382
|
|
|
@@ -1361,15 +1390,17 @@ var script = {
|
|
|
1361
1390
|
}
|
|
1362
1391
|
|
|
1363
1392
|
let isValid = true;
|
|
1393
|
+
|
|
1364
1394
|
if (this.isSingleSelection()) {
|
|
1365
1395
|
if (!this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false)) {
|
|
1366
1396
|
isValid = false;
|
|
1367
1397
|
}
|
|
1368
|
-
} else if (value.every(v => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
|
|
1398
|
+
} else if (value.every((v) => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
|
|
1369
1399
|
if (this.isRangeSelection()) {
|
|
1370
1400
|
isValid = value.length > 1 && value[1] > value[0] ? true : false;
|
|
1371
1401
|
}
|
|
1372
1402
|
}
|
|
1403
|
+
|
|
1373
1404
|
return isValid;
|
|
1374
1405
|
},
|
|
1375
1406
|
parseValue(text) {
|
|
@@ -1381,17 +1412,19 @@ var script = {
|
|
|
1381
1412
|
|
|
1382
1413
|
if (this.isSingleSelection()) {
|
|
1383
1414
|
value = this.parseDateTime(text);
|
|
1384
|
-
}
|
|
1385
|
-
else if (this.isMultipleSelection()) {
|
|
1415
|
+
} else if (this.isMultipleSelection()) {
|
|
1386
1416
|
let tokens = text.split(',');
|
|
1417
|
+
|
|
1387
1418
|
value = [];
|
|
1419
|
+
|
|
1388
1420
|
for (let token of tokens) {
|
|
1389
1421
|
value.push(this.parseDateTime(token.trim()));
|
|
1390
1422
|
}
|
|
1391
|
-
}
|
|
1392
|
-
else if (this.isRangeSelection()) {
|
|
1423
|
+
} else if (this.isRangeSelection()) {
|
|
1393
1424
|
let tokens = text.split(' - ');
|
|
1425
|
+
|
|
1394
1426
|
value = [];
|
|
1427
|
+
|
|
1395
1428
|
for (let i = 0; i < tokens.length; i++) {
|
|
1396
1429
|
value[i] = this.parseDateTime(tokens[i].trim());
|
|
1397
1430
|
}
|
|
@@ -1406,14 +1439,13 @@ var script = {
|
|
|
1406
1439
|
if (this.timeOnly) {
|
|
1407
1440
|
date = new Date();
|
|
1408
1441
|
this.populateTime(date, parts[0], parts[1]);
|
|
1409
|
-
}
|
|
1410
|
-
else {
|
|
1442
|
+
} else {
|
|
1411
1443
|
const dateFormat = this.datePattern;
|
|
1444
|
+
|
|
1412
1445
|
if (this.showTime) {
|
|
1413
1446
|
date = this.parseDate(parts[0], dateFormat);
|
|
1414
1447
|
this.populateTime(date, parts[1], parts[2]);
|
|
1415
|
-
}
|
|
1416
|
-
else {
|
|
1448
|
+
} else {
|
|
1417
1449
|
date = this.parseDate(text, dateFormat);
|
|
1418
1450
|
}
|
|
1419
1451
|
}
|
|
@@ -1425,8 +1457,10 @@ var script = {
|
|
|
1425
1457
|
throw 'Invalid Time';
|
|
1426
1458
|
}
|
|
1427
1459
|
|
|
1428
|
-
|
|
1460
|
+
//DEBUG: 2952
|
|
1461
|
+
this.pm = ampm === this.$primevue.config.locale.am || ampm === this.$primevue.config.locale.am.toLowerCase();
|
|
1429
1462
|
let time = this.parseTime(timeString);
|
|
1463
|
+
|
|
1430
1464
|
value.setHours(time.hour);
|
|
1431
1465
|
value.setMinutes(time.minute);
|
|
1432
1466
|
value.setSeconds(time.second);
|
|
@@ -1434,10 +1468,10 @@ var script = {
|
|
|
1434
1468
|
parseTime(value) {
|
|
1435
1469
|
let tokens = value.split(':');
|
|
1436
1470
|
let validTokenLength = this.showSeconds ? 3 : 2;
|
|
1437
|
-
let regex =
|
|
1471
|
+
let regex = /^[0-9][0-9]$/;
|
|
1438
1472
|
|
|
1439
1473
|
if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || (this.showSeconds && !tokens[2].match(regex))) {
|
|
1440
|
-
throw
|
|
1474
|
+
throw 'Invalid time';
|
|
1441
1475
|
}
|
|
1442
1476
|
|
|
1443
1477
|
let h = parseInt(tokens[0]);
|
|
@@ -1445,88 +1479,97 @@ var script = {
|
|
|
1445
1479
|
let s = this.showSeconds ? parseInt(tokens[2]) : null;
|
|
1446
1480
|
|
|
1447
1481
|
if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat == '12' && h > 12) || (this.showSeconds && (isNaN(s) || s > 59))) {
|
|
1448
|
-
throw
|
|
1449
|
-
}
|
|
1450
|
-
else {
|
|
1482
|
+
throw 'Invalid time';
|
|
1483
|
+
} else {
|
|
1451
1484
|
if (this.hourFormat == '12' && h !== 12 && this.pm) {
|
|
1452
|
-
h+= 12;
|
|
1485
|
+
h += 12;
|
|
1453
1486
|
}
|
|
1454
1487
|
|
|
1455
|
-
return {hour: h, minute: m, second: s};
|
|
1488
|
+
return { hour: h, minute: m, second: s };
|
|
1456
1489
|
}
|
|
1457
1490
|
},
|
|
1458
1491
|
parseDate(value, format) {
|
|
1459
1492
|
if (format == null || value == null) {
|
|
1460
|
-
throw
|
|
1493
|
+
throw 'Invalid arguments';
|
|
1461
1494
|
}
|
|
1462
1495
|
|
|
1463
|
-
value =
|
|
1464
|
-
|
|
1496
|
+
value = typeof value === 'object' ? value.toString() : value + '';
|
|
1497
|
+
|
|
1498
|
+
if (value === '') {
|
|
1465
1499
|
return null;
|
|
1466
1500
|
}
|
|
1467
1501
|
|
|
1468
|
-
let iFormat,
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
iFormat
|
|
1481
|
-
}
|
|
1482
|
-
return matches;
|
|
1483
|
-
},
|
|
1484
|
-
getNumber = (match) => {
|
|
1485
|
-
let isDoubled = lookAhead(match),
|
|
1486
|
-
size = (match === "@" ? 14 : (match === "!" ? 20 :
|
|
1487
|
-
(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
|
|
1488
|
-
minSize = (match === "y" ? size : 1),
|
|
1489
|
-
digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
|
|
1490
|
-
num = value.substring(iValue).match(digits);
|
|
1491
|
-
if (!num) {
|
|
1492
|
-
throw "Missing number at position " + iValue;
|
|
1493
|
-
}
|
|
1494
|
-
iValue += num[ 0 ].length;
|
|
1495
|
-
return parseInt(num[ 0 ], 10);
|
|
1496
|
-
},
|
|
1497
|
-
getName = (match, shortNames, longNames) => {
|
|
1498
|
-
let index = -1;
|
|
1499
|
-
let arr = lookAhead(match) ? longNames : shortNames;
|
|
1500
|
-
let names = [];
|
|
1501
|
-
|
|
1502
|
-
for (let i = 0; i < arr.length; i++) {
|
|
1503
|
-
names.push([i,arr[i]]);
|
|
1504
|
-
}
|
|
1505
|
-
names.sort((a,b) => {
|
|
1506
|
-
return -(a[ 1 ].length - b[ 1 ].length);
|
|
1507
|
-
});
|
|
1502
|
+
let iFormat,
|
|
1503
|
+
dim,
|
|
1504
|
+
extra,
|
|
1505
|
+
iValue = 0,
|
|
1506
|
+
shortYearCutoff = typeof this.shortYearCutoff !== 'string' ? this.shortYearCutoff : (new Date().getFullYear() % 100) + parseInt(this.shortYearCutoff, 10),
|
|
1507
|
+
year = -1,
|
|
1508
|
+
month = -1,
|
|
1509
|
+
day = -1,
|
|
1510
|
+
doy = -1,
|
|
1511
|
+
literal = false,
|
|
1512
|
+
date,
|
|
1513
|
+
lookAhead = (match) => {
|
|
1514
|
+
let matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
|
|
1508
1515
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
|
1512
|
-
index = names[i][0];
|
|
1513
|
-
iValue += name.length;
|
|
1514
|
-
break;
|
|
1516
|
+
if (matches) {
|
|
1517
|
+
iFormat++;
|
|
1515
1518
|
}
|
|
1516
|
-
}
|
|
1517
1519
|
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1520
|
+
return matches;
|
|
1521
|
+
},
|
|
1522
|
+
getNumber = (match) => {
|
|
1523
|
+
let isDoubled = lookAhead(match),
|
|
1524
|
+
size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,
|
|
1525
|
+
minSize = match === 'y' ? size : 1,
|
|
1526
|
+
digits = new RegExp('^\\d{' + minSize + ',' + size + '}'),
|
|
1527
|
+
num = value.substring(iValue).match(digits);
|
|
1528
|
+
|
|
1529
|
+
if (!num) {
|
|
1530
|
+
throw 'Missing number at position ' + iValue;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
iValue += num[0].length;
|
|
1534
|
+
|
|
1535
|
+
return parseInt(num[0], 10);
|
|
1536
|
+
},
|
|
1537
|
+
getName = (match, shortNames, longNames) => {
|
|
1538
|
+
let index = -1;
|
|
1539
|
+
let arr = lookAhead(match) ? longNames : shortNames;
|
|
1540
|
+
let names = [];
|
|
1541
|
+
|
|
1542
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1543
|
+
names.push([i, arr[i]]);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
names.sort((a, b) => {
|
|
1547
|
+
return -(a[1].length - b[1].length);
|
|
1548
|
+
});
|
|
1549
|
+
|
|
1550
|
+
for (let i = 0; i < names.length; i++) {
|
|
1551
|
+
let name = names[i][1];
|
|
1552
|
+
|
|
1553
|
+
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
|
1554
|
+
index = names[i][0];
|
|
1555
|
+
iValue += name.length;
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
if (index !== -1) {
|
|
1561
|
+
return index + 1;
|
|
1562
|
+
} else {
|
|
1563
|
+
throw 'Unknown name at position ' + iValue;
|
|
1564
|
+
}
|
|
1565
|
+
},
|
|
1566
|
+
checkLiteral = () => {
|
|
1567
|
+
if (value.charAt(iValue) !== format.charAt(iFormat)) {
|
|
1568
|
+
throw 'Unexpected literal at position ' + iValue;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
iValue++;
|
|
1572
|
+
};
|
|
1530
1573
|
|
|
1531
1574
|
if (this.currentView === 'month') {
|
|
1532
1575
|
day = 1;
|
|
@@ -1541,32 +1584,32 @@ var script = {
|
|
|
1541
1584
|
}
|
|
1542
1585
|
} else {
|
|
1543
1586
|
switch (format.charAt(iFormat)) {
|
|
1544
|
-
case
|
|
1545
|
-
day = getNumber(
|
|
1587
|
+
case 'd':
|
|
1588
|
+
day = getNumber('d');
|
|
1546
1589
|
break;
|
|
1547
|
-
case
|
|
1548
|
-
getName(
|
|
1590
|
+
case 'D':
|
|
1591
|
+
getName('D', this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
|
|
1549
1592
|
break;
|
|
1550
|
-
case
|
|
1551
|
-
doy = getNumber(
|
|
1593
|
+
case 'o':
|
|
1594
|
+
doy = getNumber('o');
|
|
1552
1595
|
break;
|
|
1553
|
-
case
|
|
1554
|
-
month = getNumber(
|
|
1596
|
+
case 'm':
|
|
1597
|
+
month = getNumber('m');
|
|
1555
1598
|
break;
|
|
1556
|
-
case
|
|
1557
|
-
month = getName(
|
|
1599
|
+
case 'M':
|
|
1600
|
+
month = getName('M', this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
1558
1601
|
break;
|
|
1559
|
-
case
|
|
1560
|
-
year = getNumber(
|
|
1602
|
+
case 'y':
|
|
1603
|
+
year = getNumber('y');
|
|
1561
1604
|
break;
|
|
1562
|
-
case
|
|
1563
|
-
date = new Date(getNumber(
|
|
1605
|
+
case '@':
|
|
1606
|
+
date = new Date(getNumber('@'));
|
|
1564
1607
|
year = date.getFullYear();
|
|
1565
1608
|
month = date.getMonth() + 1;
|
|
1566
1609
|
day = date.getDate();
|
|
1567
1610
|
break;
|
|
1568
|
-
case
|
|
1569
|
-
date = new Date((getNumber(
|
|
1611
|
+
case '!':
|
|
1612
|
+
date = new Date((getNumber('!') - this.ticksTo1970) / 10000);
|
|
1570
1613
|
year = date.getFullYear();
|
|
1571
1614
|
month = date.getMonth() + 1;
|
|
1572
1615
|
day = date.getDate();
|
|
@@ -1577,6 +1620,7 @@ var script = {
|
|
|
1577
1620
|
} else {
|
|
1578
1621
|
literal = true;
|
|
1579
1622
|
}
|
|
1623
|
+
|
|
1580
1624
|
break;
|
|
1581
1625
|
default:
|
|
1582
1626
|
checkLiteral();
|
|
@@ -1586,95 +1630,124 @@ var script = {
|
|
|
1586
1630
|
|
|
1587
1631
|
if (iValue < value.length) {
|
|
1588
1632
|
extra = value.substr(iValue);
|
|
1633
|
+
|
|
1589
1634
|
if (!/^\s+/.test(extra)) {
|
|
1590
|
-
throw
|
|
1635
|
+
throw 'Extra/unparsed characters found in date: ' + extra;
|
|
1591
1636
|
}
|
|
1592
1637
|
}
|
|
1593
1638
|
|
|
1594
1639
|
if (year === -1) {
|
|
1595
1640
|
year = new Date().getFullYear();
|
|
1596
1641
|
} else if (year < 100) {
|
|
1597
|
-
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
|
1598
|
-
(year <= shortYearCutoff ? 0 : -100);
|
|
1642
|
+
year += new Date().getFullYear() - (new Date().getFullYear() % 100) + (year <= shortYearCutoff ? 0 : -100);
|
|
1599
1643
|
}
|
|
1600
1644
|
|
|
1601
1645
|
if (doy > -1) {
|
|
1602
1646
|
month = 1;
|
|
1603
1647
|
day = doy;
|
|
1648
|
+
|
|
1604
1649
|
do {
|
|
1605
1650
|
dim = this.getDaysCountInMonth(year, month - 1);
|
|
1651
|
+
|
|
1606
1652
|
if (day <= dim) {
|
|
1607
1653
|
break;
|
|
1608
1654
|
}
|
|
1655
|
+
|
|
1609
1656
|
month++;
|
|
1610
1657
|
day -= dim;
|
|
1611
|
-
|
|
1658
|
+
// eslint-disable-next-line
|
|
1612
1659
|
} while (true);
|
|
1613
1660
|
}
|
|
1614
1661
|
|
|
1615
1662
|
date = this.daylightSavingAdjust(new Date(year, month - 1, day));
|
|
1616
1663
|
|
|
1617
1664
|
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
|
1618
|
-
throw
|
|
1665
|
+
throw 'Invalid date'; // E.g. 31/02/00
|
|
1619
1666
|
}
|
|
1620
1667
|
|
|
1621
1668
|
return date;
|
|
1622
1669
|
},
|
|
1623
1670
|
getWeekNumber(date) {
|
|
1624
1671
|
let checkDate = new Date(date.getTime());
|
|
1625
|
-
|
|
1672
|
+
|
|
1673
|
+
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
|
1626
1674
|
let time = checkDate.getTime();
|
|
1627
|
-
|
|
1628
|
-
checkDate.
|
|
1629
|
-
|
|
1675
|
+
|
|
1676
|
+
checkDate.setMonth(0);
|
|
1677
|
+
checkDate.setDate(1);
|
|
1678
|
+
|
|
1679
|
+
return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;
|
|
1630
1680
|
},
|
|
1631
1681
|
onDateCellKeydown(event, date, groupIndex) {
|
|
1632
1682
|
const cellContent = event.currentTarget;
|
|
1633
1683
|
const cell = cellContent.parentElement;
|
|
1634
1684
|
|
|
1685
|
+
const cellIndex = utils.DomHandler.index(cell);
|
|
1686
|
+
|
|
1635
1687
|
switch (event.code) {
|
|
1636
1688
|
case 'ArrowDown': {
|
|
1637
1689
|
cellContent.tabIndex = '-1';
|
|
1638
|
-
|
|
1690
|
+
|
|
1639
1691
|
let nextRow = cell.parentElement.nextElementSibling;
|
|
1692
|
+
|
|
1640
1693
|
if (nextRow) {
|
|
1641
|
-
let
|
|
1642
|
-
|
|
1643
|
-
|
|
1694
|
+
let tableRowIndex = utils.DomHandler.index(cell.parentElement);
|
|
1695
|
+
const tableRows = Array.from(cell.parentElement.parentElement.children);
|
|
1696
|
+
const nextTableRows = tableRows.slice(tableRowIndex + 1);
|
|
1697
|
+
|
|
1698
|
+
let hasNextFocusableDate = nextTableRows.find((el) => {
|
|
1699
|
+
let focusCell = el.children[cellIndex].children[0];
|
|
1700
|
+
|
|
1701
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1702
|
+
});
|
|
1703
|
+
|
|
1704
|
+
if (hasNextFocusableDate) {
|
|
1705
|
+
let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
|
|
1706
|
+
|
|
1707
|
+
focusCell.tabIndex = '0';
|
|
1708
|
+
focusCell.focus();
|
|
1709
|
+
} else {
|
|
1710
|
+
this.navigationState = { backward: false };
|
|
1644
1711
|
this.navForward(event);
|
|
1645
1712
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
nextRow.children[cellIndex].children[0].focus();
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
else {
|
|
1652
|
-
this.navigationState = {backward: false};
|
|
1713
|
+
} else {
|
|
1714
|
+
this.navigationState = { backward: false };
|
|
1653
1715
|
this.navForward(event);
|
|
1654
1716
|
}
|
|
1717
|
+
|
|
1655
1718
|
event.preventDefault();
|
|
1656
1719
|
break;
|
|
1657
1720
|
}
|
|
1658
1721
|
|
|
1659
1722
|
case 'ArrowUp': {
|
|
1660
1723
|
cellContent.tabIndex = '-1';
|
|
1661
|
-
let cellIndex = utils.DomHandler.index(cell);
|
|
1662
1724
|
let prevRow = cell.parentElement.previousElementSibling;
|
|
1725
|
+
|
|
1663
1726
|
if (prevRow) {
|
|
1664
|
-
let
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1727
|
+
let tableRowIndex = utils.DomHandler.index(cell.parentElement);
|
|
1728
|
+
const tableRows = Array.from(cell.parentElement.parentElement.children);
|
|
1729
|
+
const prevTableRows = tableRows.slice(0, tableRowIndex).reverse();
|
|
1730
|
+
|
|
1731
|
+
let hasNextFocusableDate = prevTableRows.find((el) => {
|
|
1732
|
+
let focusCell = el.children[cellIndex].children[0];
|
|
1733
|
+
|
|
1734
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1735
|
+
});
|
|
1736
|
+
|
|
1737
|
+
if (hasNextFocusableDate) {
|
|
1738
|
+
let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
|
|
1739
|
+
|
|
1670
1740
|
focusCell.tabIndex = '0';
|
|
1671
1741
|
focusCell.focus();
|
|
1742
|
+
} else {
|
|
1743
|
+
this.navigationState = { backward: true };
|
|
1744
|
+
this.navBackward(event);
|
|
1672
1745
|
}
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
this.navigationState = {backward: true};
|
|
1746
|
+
} else {
|
|
1747
|
+
this.navigationState = { backward: true };
|
|
1676
1748
|
this.navBackward(event);
|
|
1677
1749
|
}
|
|
1750
|
+
|
|
1678
1751
|
event.preventDefault();
|
|
1679
1752
|
break;
|
|
1680
1753
|
}
|
|
@@ -1682,19 +1755,29 @@ var script = {
|
|
|
1682
1755
|
case 'ArrowLeft': {
|
|
1683
1756
|
cellContent.tabIndex = '-1';
|
|
1684
1757
|
let prevCell = cell.previousElementSibling;
|
|
1758
|
+
|
|
1685
1759
|
if (prevCell) {
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1760
|
+
const cells = Array.from(cell.parentElement.children);
|
|
1761
|
+
const prevCells = cells.slice(0, cellIndex).reverse();
|
|
1762
|
+
|
|
1763
|
+
let hasNextFocusableDate = prevCells.find((el) => {
|
|
1764
|
+
let focusCell = el.children[0];
|
|
1765
|
+
|
|
1766
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1767
|
+
});
|
|
1768
|
+
|
|
1769
|
+
if (hasNextFocusableDate) {
|
|
1770
|
+
let focusCell = hasNextFocusableDate.children[0];
|
|
1771
|
+
|
|
1691
1772
|
focusCell.tabIndex = '0';
|
|
1692
1773
|
focusCell.focus();
|
|
1774
|
+
} else {
|
|
1775
|
+
this.navigateToMonth(event, true, groupIndex);
|
|
1693
1776
|
}
|
|
1694
|
-
}
|
|
1695
|
-
else {
|
|
1777
|
+
} else {
|
|
1696
1778
|
this.navigateToMonth(event, true, groupIndex);
|
|
1697
1779
|
}
|
|
1780
|
+
|
|
1698
1781
|
event.preventDefault();
|
|
1699
1782
|
break;
|
|
1700
1783
|
}
|
|
@@ -1702,24 +1785,34 @@ var script = {
|
|
|
1702
1785
|
case 'ArrowRight': {
|
|
1703
1786
|
cellContent.tabIndex = '-1';
|
|
1704
1787
|
let nextCell = cell.nextElementSibling;
|
|
1788
|
+
|
|
1705
1789
|
if (nextCell) {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1790
|
+
const cells = Array.from(cell.parentElement.children);
|
|
1791
|
+
const nextCells = cells.slice(cellIndex + 1);
|
|
1792
|
+
let hasNextFocusableDate = nextCells.find((el) => {
|
|
1793
|
+
let focusCell = el.children[0];
|
|
1794
|
+
|
|
1795
|
+
return !utils.DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1796
|
+
});
|
|
1797
|
+
|
|
1798
|
+
if (hasNextFocusableDate) {
|
|
1799
|
+
let focusCell = hasNextFocusableDate.children[0];
|
|
1800
|
+
|
|
1711
1801
|
focusCell.tabIndex = '0';
|
|
1712
1802
|
focusCell.focus();
|
|
1803
|
+
} else {
|
|
1804
|
+
this.navigateToMonth(event, false, groupIndex);
|
|
1713
1805
|
}
|
|
1714
|
-
}
|
|
1715
|
-
else {
|
|
1806
|
+
} else {
|
|
1716
1807
|
this.navigateToMonth(event, false, groupIndex);
|
|
1717
1808
|
}
|
|
1809
|
+
|
|
1718
1810
|
event.preventDefault();
|
|
1719
1811
|
break;
|
|
1720
1812
|
}
|
|
1721
1813
|
|
|
1722
1814
|
case 'Enter':
|
|
1815
|
+
|
|
1723
1816
|
case 'Space': {
|
|
1724
1817
|
this.onDateSelect(event, date);
|
|
1725
1818
|
event.preventDefault();
|
|
@@ -1736,6 +1829,7 @@ var script = {
|
|
|
1736
1829
|
if (!this.inline) {
|
|
1737
1830
|
this.trapFocus(event);
|
|
1738
1831
|
}
|
|
1832
|
+
|
|
1739
1833
|
break;
|
|
1740
1834
|
}
|
|
1741
1835
|
|
|
@@ -1743,10 +1837,10 @@ var script = {
|
|
|
1743
1837
|
cellContent.tabIndex = '-1';
|
|
1744
1838
|
let currentRow = cell.parentElement;
|
|
1745
1839
|
let focusCell = currentRow.children[0].children[0];
|
|
1840
|
+
|
|
1746
1841
|
if (utils.DomHandler.hasClass(focusCell, 'p-disabled')) {
|
|
1747
1842
|
this.navigateToMonth(event, true, groupIndex);
|
|
1748
|
-
}
|
|
1749
|
-
else {
|
|
1843
|
+
} else {
|
|
1750
1844
|
focusCell.tabIndex = '0';
|
|
1751
1845
|
focusCell.focus();
|
|
1752
1846
|
}
|
|
@@ -1758,11 +1852,11 @@ var script = {
|
|
|
1758
1852
|
case 'End': {
|
|
1759
1853
|
cellContent.tabIndex = '-1';
|
|
1760
1854
|
let currentRow = cell.parentElement;
|
|
1761
|
-
let focusCell = currentRow.children[currentRow.children.length -1].children[0];
|
|
1855
|
+
let focusCell = currentRow.children[currentRow.children.length - 1].children[0];
|
|
1856
|
+
|
|
1762
1857
|
if (utils.DomHandler.hasClass(focusCell, 'p-disabled')) {
|
|
1763
1858
|
this.navigateToMonth(event, false, groupIndex);
|
|
1764
|
-
}
|
|
1765
|
-
else {
|
|
1859
|
+
} else {
|
|
1766
1860
|
focusCell.tabIndex = '0';
|
|
1767
1861
|
focusCell.focus();
|
|
1768
1862
|
}
|
|
@@ -1774,10 +1868,9 @@ var script = {
|
|
|
1774
1868
|
case 'PageUp': {
|
|
1775
1869
|
cellContent.tabIndex = '-1';
|
|
1776
1870
|
if (event.shiftKey) {
|
|
1777
|
-
this.navigationState = {backward: true};
|
|
1871
|
+
this.navigationState = { backward: true };
|
|
1778
1872
|
this.navBackward(event);
|
|
1779
|
-
}
|
|
1780
|
-
else this.navigateToMonth(event, true, groupIndex);
|
|
1873
|
+
} else this.navigateToMonth(event, true, groupIndex);
|
|
1781
1874
|
|
|
1782
1875
|
event.preventDefault();
|
|
1783
1876
|
break;
|
|
@@ -1786,10 +1879,9 @@ var script = {
|
|
|
1786
1879
|
case 'PageDown': {
|
|
1787
1880
|
cellContent.tabIndex = '-1';
|
|
1788
1881
|
if (event.shiftKey) {
|
|
1789
|
-
this.navigationState = {backward: false};
|
|
1882
|
+
this.navigationState = { backward: false };
|
|
1790
1883
|
this.navForward(event);
|
|
1791
|
-
}
|
|
1792
|
-
else this.navigateToMonth(event, false, groupIndex);
|
|
1884
|
+
} else this.navigateToMonth(event, false, groupIndex);
|
|
1793
1885
|
|
|
1794
1886
|
event.preventDefault();
|
|
1795
1887
|
break;
|
|
@@ -1798,26 +1890,25 @@ var script = {
|
|
|
1798
1890
|
},
|
|
1799
1891
|
navigateToMonth(event, prev, groupIndex) {
|
|
1800
1892
|
if (prev) {
|
|
1801
|
-
if (this.numberOfMonths === 1 ||
|
|
1802
|
-
this.navigationState = {backward: true};
|
|
1893
|
+
if (this.numberOfMonths === 1 || groupIndex === 0) {
|
|
1894
|
+
this.navigationState = { backward: true };
|
|
1803
1895
|
this.navBackward(event);
|
|
1804
|
-
}
|
|
1805
|
-
else {
|
|
1896
|
+
} else {
|
|
1806
1897
|
let prevMonthContainer = this.overlay.children[groupIndex - 1];
|
|
1807
1898
|
let cells = utils.DomHandler.find(prevMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
1808
1899
|
let focusCell = cells[cells.length - 1];
|
|
1900
|
+
|
|
1809
1901
|
focusCell.tabIndex = '0';
|
|
1810
1902
|
focusCell.focus();
|
|
1811
1903
|
}
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
this.navigationState = {backward: false};
|
|
1904
|
+
} else {
|
|
1905
|
+
if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) {
|
|
1906
|
+
this.navigationState = { backward: false };
|
|
1816
1907
|
this.navForward(event);
|
|
1817
|
-
}
|
|
1818
|
-
else {
|
|
1908
|
+
} else {
|
|
1819
1909
|
let nextMonthContainer = this.overlay.children[groupIndex + 1];
|
|
1820
1910
|
let focusCell = utils.DomHandler.findSingle(nextMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
1911
|
+
|
|
1821
1912
|
focusCell.tabIndex = '0';
|
|
1822
1913
|
focusCell.focus();
|
|
1823
1914
|
}
|
|
@@ -1828,15 +1919,18 @@ var script = {
|
|
|
1828
1919
|
|
|
1829
1920
|
switch (event.code) {
|
|
1830
1921
|
case 'ArrowUp':
|
|
1922
|
+
|
|
1831
1923
|
case 'ArrowDown': {
|
|
1832
1924
|
cell.tabIndex = '-1';
|
|
1833
1925
|
var cells = cell.parentElement.children;
|
|
1834
1926
|
var cellIndex = utils.DomHandler.index(cell);
|
|
1835
|
-
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex -3];
|
|
1927
|
+
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex - 3];
|
|
1928
|
+
|
|
1836
1929
|
if (nextCell) {
|
|
1837
1930
|
nextCell.tabIndex = '0';
|
|
1838
1931
|
nextCell.focus();
|
|
1839
1932
|
}
|
|
1933
|
+
|
|
1840
1934
|
event.preventDefault();
|
|
1841
1935
|
break;
|
|
1842
1936
|
}
|
|
@@ -1844,14 +1938,15 @@ var script = {
|
|
|
1844
1938
|
case 'ArrowLeft': {
|
|
1845
1939
|
cell.tabIndex = '-1';
|
|
1846
1940
|
let prevCell = cell.previousElementSibling;
|
|
1941
|
+
|
|
1847
1942
|
if (prevCell) {
|
|
1848
1943
|
prevCell.tabIndex = '0';
|
|
1849
1944
|
prevCell.focus();
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
this.navigationState = {backward: true};
|
|
1945
|
+
} else {
|
|
1946
|
+
this.navigationState = { backward: true };
|
|
1853
1947
|
this.navBackward(event);
|
|
1854
1948
|
}
|
|
1949
|
+
|
|
1855
1950
|
event.preventDefault();
|
|
1856
1951
|
break;
|
|
1857
1952
|
}
|
|
@@ -1859,21 +1954,22 @@ var script = {
|
|
|
1859
1954
|
case 'ArrowRight': {
|
|
1860
1955
|
cell.tabIndex = '-1';
|
|
1861
1956
|
let nextCell = cell.nextElementSibling;
|
|
1957
|
+
|
|
1862
1958
|
if (nextCell) {
|
|
1863
1959
|
nextCell.tabIndex = '0';
|
|
1864
1960
|
nextCell.focus();
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
this.navigationState = {backward: false};
|
|
1961
|
+
} else {
|
|
1962
|
+
this.navigationState = { backward: false };
|
|
1868
1963
|
this.navForward(event);
|
|
1869
1964
|
}
|
|
1965
|
+
|
|
1870
1966
|
event.preventDefault();
|
|
1871
1967
|
break;
|
|
1872
1968
|
}
|
|
1873
1969
|
|
|
1874
1970
|
case 'PageUp': {
|
|
1875
1971
|
if (event.shiftKey) return;
|
|
1876
|
-
this.navigationState = {backward: true};
|
|
1972
|
+
this.navigationState = { backward: true };
|
|
1877
1973
|
this.navBackward(event);
|
|
1878
1974
|
|
|
1879
1975
|
break;
|
|
@@ -1881,13 +1977,14 @@ var script = {
|
|
|
1881
1977
|
|
|
1882
1978
|
case 'PageDown': {
|
|
1883
1979
|
if (event.shiftKey) return;
|
|
1884
|
-
this.navigationState = {backward: false};
|
|
1980
|
+
this.navigationState = { backward: false };
|
|
1885
1981
|
this.navForward(event);
|
|
1886
1982
|
|
|
1887
1983
|
break;
|
|
1888
1984
|
}
|
|
1889
1985
|
|
|
1890
1986
|
case 'Enter':
|
|
1987
|
+
|
|
1891
1988
|
case 'Space': {
|
|
1892
1989
|
this.onMonthSelect(event, index);
|
|
1893
1990
|
event.preventDefault();
|
|
@@ -1911,15 +2008,18 @@ var script = {
|
|
|
1911
2008
|
|
|
1912
2009
|
switch (event.code) {
|
|
1913
2010
|
case 'ArrowUp':
|
|
1914
|
-
|
|
2011
|
+
|
|
2012
|
+
case 'ArrowDown': {
|
|
1915
2013
|
cell.tabIndex = '-1';
|
|
1916
2014
|
var cells = cell.parentElement.children;
|
|
1917
2015
|
var cellIndex = utils.DomHandler.index(cell);
|
|
1918
2016
|
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 2 : cellIndex - 2];
|
|
2017
|
+
|
|
1919
2018
|
if (nextCell) {
|
|
1920
2019
|
nextCell.tabIndex = '0';
|
|
1921
2020
|
nextCell.focus();
|
|
1922
2021
|
}
|
|
2022
|
+
|
|
1923
2023
|
event.preventDefault();
|
|
1924
2024
|
break;
|
|
1925
2025
|
}
|
|
@@ -1927,14 +2027,15 @@ var script = {
|
|
|
1927
2027
|
case 'ArrowLeft': {
|
|
1928
2028
|
cell.tabIndex = '-1';
|
|
1929
2029
|
let prevCell = cell.previousElementSibling;
|
|
2030
|
+
|
|
1930
2031
|
if (prevCell) {
|
|
1931
2032
|
prevCell.tabIndex = '0';
|
|
1932
2033
|
prevCell.focus();
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
this.navigationState = {backward: true};
|
|
2034
|
+
} else {
|
|
2035
|
+
this.navigationState = { backward: true };
|
|
1936
2036
|
this.navBackward(event);
|
|
1937
2037
|
}
|
|
2038
|
+
|
|
1938
2039
|
event.preventDefault();
|
|
1939
2040
|
break;
|
|
1940
2041
|
}
|
|
@@ -1942,21 +2043,22 @@ var script = {
|
|
|
1942
2043
|
case 'ArrowRight': {
|
|
1943
2044
|
cell.tabIndex = '-1';
|
|
1944
2045
|
let nextCell = cell.nextElementSibling;
|
|
2046
|
+
|
|
1945
2047
|
if (nextCell) {
|
|
1946
2048
|
nextCell.tabIndex = '0';
|
|
1947
2049
|
nextCell.focus();
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
this.navigationState = {backward: false};
|
|
2050
|
+
} else {
|
|
2051
|
+
this.navigationState = { backward: false };
|
|
1951
2052
|
this.navForward(event);
|
|
1952
2053
|
}
|
|
2054
|
+
|
|
1953
2055
|
event.preventDefault();
|
|
1954
2056
|
break;
|
|
1955
2057
|
}
|
|
1956
2058
|
|
|
1957
2059
|
case 'PageUp': {
|
|
1958
2060
|
if (event.shiftKey) return;
|
|
1959
|
-
this.navigationState = {backward: true};
|
|
2061
|
+
this.navigationState = { backward: true };
|
|
1960
2062
|
this.navBackward(event);
|
|
1961
2063
|
|
|
1962
2064
|
break;
|
|
@@ -1964,13 +2066,14 @@ var script = {
|
|
|
1964
2066
|
|
|
1965
2067
|
case 'PageDown': {
|
|
1966
2068
|
if (event.shiftKey) return;
|
|
1967
|
-
this.navigationState = {backward: false};
|
|
2069
|
+
this.navigationState = { backward: false };
|
|
1968
2070
|
this.navForward(event);
|
|
1969
2071
|
|
|
1970
2072
|
break;
|
|
1971
2073
|
}
|
|
1972
2074
|
|
|
1973
2075
|
case 'Enter':
|
|
2076
|
+
|
|
1974
2077
|
case 'Space': {
|
|
1975
2078
|
this.onYearSelect(event, index);
|
|
1976
2079
|
event.preventDefault();
|
|
@@ -1996,37 +2099,29 @@ var script = {
|
|
|
1996
2099
|
if (this.navigationState.button) {
|
|
1997
2100
|
this.initFocusableCell();
|
|
1998
2101
|
|
|
1999
|
-
if (this.navigationState.backward)
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
utils.DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
|
|
2003
|
-
}
|
|
2004
|
-
else {
|
|
2102
|
+
if (this.navigationState.backward) utils.DomHandler.findSingle(this.overlay, '.p-datepicker-prev').focus();
|
|
2103
|
+
else utils.DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
|
|
2104
|
+
} else {
|
|
2005
2105
|
if (this.navigationState.backward) {
|
|
2006
2106
|
let cells;
|
|
2007
2107
|
|
|
2008
2108
|
if (this.currentView === 'month') {
|
|
2009
2109
|
cells = utils.DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
|
|
2010
|
-
}
|
|
2011
|
-
else if (this.currentView === 'year') {
|
|
2110
|
+
} else if (this.currentView === 'year') {
|
|
2012
2111
|
cells = utils.DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
|
|
2013
|
-
}
|
|
2014
|
-
else {
|
|
2112
|
+
} else {
|
|
2015
2113
|
cells = utils.DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
2016
2114
|
}
|
|
2017
2115
|
|
|
2018
2116
|
if (cells && cells.length > 0) {
|
|
2019
2117
|
cell = cells[cells.length - 1];
|
|
2020
2118
|
}
|
|
2021
|
-
}
|
|
2022
|
-
else {
|
|
2119
|
+
} else {
|
|
2023
2120
|
if (this.currentView === 'month') {
|
|
2024
2121
|
cell = utils.DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
|
|
2025
|
-
}
|
|
2026
|
-
else if (this.currentView === 'year') {
|
|
2122
|
+
} else if (this.currentView === 'year') {
|
|
2027
2123
|
cell = utils.DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
|
|
2028
|
-
}
|
|
2029
|
-
else {
|
|
2124
|
+
} else {
|
|
2030
2125
|
cell = utils.DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
2031
2126
|
}
|
|
2032
2127
|
}
|
|
@@ -2038,8 +2133,7 @@ var script = {
|
|
|
2038
2133
|
}
|
|
2039
2134
|
|
|
2040
2135
|
this.navigationState = null;
|
|
2041
|
-
}
|
|
2042
|
-
else {
|
|
2136
|
+
} else {
|
|
2043
2137
|
this.initFocusableCell();
|
|
2044
2138
|
}
|
|
2045
2139
|
},
|
|
@@ -2048,24 +2142,24 @@ var script = {
|
|
|
2048
2142
|
|
|
2049
2143
|
if (this.currentView === 'month') {
|
|
2050
2144
|
let cells = utils.DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month');
|
|
2051
|
-
let selectedCell= utils.DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
|
|
2052
|
-
|
|
2145
|
+
let selectedCell = utils.DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
|
|
2146
|
+
|
|
2147
|
+
cells.forEach((cell) => (cell.tabIndex = -1));
|
|
2053
2148
|
cell = selectedCell || cells[0];
|
|
2054
|
-
}
|
|
2055
|
-
else if (this.currentView === 'year') {
|
|
2149
|
+
} else if (this.currentView === 'year') {
|
|
2056
2150
|
let cells = utils.DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year');
|
|
2057
|
-
let selectedCell= utils.DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
|
|
2058
|
-
|
|
2151
|
+
let selectedCell = utils.DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
|
|
2152
|
+
|
|
2153
|
+
cells.forEach((cell) => (cell.tabIndex = -1));
|
|
2059
2154
|
cell = selectedCell || cells[0];
|
|
2060
|
-
}
|
|
2061
|
-
else {
|
|
2155
|
+
} else {
|
|
2062
2156
|
cell = utils.DomHandler.findSingle(this.overlay, 'span.p-highlight');
|
|
2157
|
+
|
|
2063
2158
|
if (!cell) {
|
|
2064
2159
|
let todayCell = utils.DomHandler.findSingle(this.overlay, 'td.p-datepicker-today span:not(.p-disabled):not(.p-ink');
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
else
|
|
2068
|
-
cell = utils.DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
|
|
2160
|
+
|
|
2161
|
+
if (todayCell) cell = todayCell;
|
|
2162
|
+
else cell = utils.DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
|
|
2069
2163
|
}
|
|
2070
2164
|
}
|
|
2071
2165
|
|
|
@@ -2086,34 +2180,27 @@ var script = {
|
|
|
2086
2180
|
if (focusableElements && focusableElements.length > 0) {
|
|
2087
2181
|
if (!document.activeElement) {
|
|
2088
2182
|
focusableElements[0].focus();
|
|
2089
|
-
}
|
|
2090
|
-
else {
|
|
2183
|
+
} else {
|
|
2091
2184
|
let focusedIndex = focusableElements.indexOf(document.activeElement);
|
|
2092
2185
|
|
|
2093
2186
|
if (event.shiftKey) {
|
|
2094
|
-
if (focusedIndex === -1 || focusedIndex === 0)
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
focusableElements[focusedIndex - 1].focus();
|
|
2098
|
-
}
|
|
2099
|
-
else {
|
|
2187
|
+
if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();
|
|
2188
|
+
else focusableElements[focusedIndex - 1].focus();
|
|
2189
|
+
} else {
|
|
2100
2190
|
if (focusedIndex === -1) {
|
|
2101
2191
|
if (this.timeOnly) {
|
|
2102
2192
|
focusableElements[0].focus();
|
|
2103
|
-
}
|
|
2104
|
-
else {
|
|
2193
|
+
} else {
|
|
2105
2194
|
let spanIndex = null;
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2195
|
+
|
|
2196
|
+
for (let i = 0; i < focusableElements.length; i++) {
|
|
2197
|
+
if (focusableElements[i].tagName === 'SPAN') spanIndex = i;
|
|
2109
2198
|
}
|
|
2199
|
+
|
|
2110
2200
|
focusableElements[spanIndex].focus();
|
|
2111
2201
|
}
|
|
2112
|
-
}
|
|
2113
|
-
else
|
|
2114
|
-
focusableElements[0].focus();
|
|
2115
|
-
else
|
|
2116
|
-
focusableElements[focusedIndex + 1].focus();
|
|
2202
|
+
} else if (focusedIndex === focusableElements.length - 1) focusableElements[0].focus();
|
|
2203
|
+
else focusableElements[focusedIndex + 1].focus();
|
|
2117
2204
|
}
|
|
2118
2205
|
}
|
|
2119
2206
|
}
|
|
@@ -2122,12 +2209,12 @@ var script = {
|
|
|
2122
2209
|
switch (event.code) {
|
|
2123
2210
|
case 'Tab':
|
|
2124
2211
|
this.trapFocus(event);
|
|
2125
|
-
|
|
2212
|
+
break;
|
|
2126
2213
|
|
|
2127
2214
|
case 'Escape':
|
|
2128
2215
|
this.overlayVisible = false;
|
|
2129
2216
|
event.preventDefault();
|
|
2130
|
-
|
|
2217
|
+
break;
|
|
2131
2218
|
}
|
|
2132
2219
|
|
|
2133
2220
|
this.$emit('keydown', event);
|
|
@@ -2138,26 +2225,32 @@ var script = {
|
|
|
2138
2225
|
this.selectionEnd = this.input.selectionEnd;
|
|
2139
2226
|
|
|
2140
2227
|
let value = this.parseValue(event.target.value);
|
|
2228
|
+
|
|
2141
2229
|
if (this.isValidSelection(value)) {
|
|
2142
2230
|
this.typeUpdate = true;
|
|
2143
2231
|
this.updateModel(value);
|
|
2144
2232
|
}
|
|
2145
|
-
}
|
|
2146
|
-
catch(err) {
|
|
2233
|
+
} catch (err) {
|
|
2147
2234
|
/* NoOp */
|
|
2148
2235
|
}
|
|
2149
2236
|
|
|
2150
2237
|
this.$emit('input', event);
|
|
2151
2238
|
},
|
|
2239
|
+
onInputClick() {
|
|
2240
|
+
if (this.showOnFocus && this.isEnabled() && !this.overlayVisible) {
|
|
2241
|
+
this.overlayVisible = true;
|
|
2242
|
+
}
|
|
2243
|
+
},
|
|
2152
2244
|
onFocus(event) {
|
|
2153
2245
|
if (this.showOnFocus && this.isEnabled()) {
|
|
2154
2246
|
this.overlayVisible = true;
|
|
2155
2247
|
}
|
|
2248
|
+
|
|
2156
2249
|
this.focused = true;
|
|
2157
2250
|
this.$emit('focus', event);
|
|
2158
2251
|
},
|
|
2159
2252
|
onBlur(event) {
|
|
2160
|
-
this.$emit('blur', {originalEvent: event, value: event.target.value});
|
|
2253
|
+
this.$emit('blur', { originalEvent: event, value: event.target.value });
|
|
2161
2254
|
|
|
2162
2255
|
this.focused = false;
|
|
2163
2256
|
event.target.value = this.formatValue(this.modelValue);
|
|
@@ -2165,19 +2258,16 @@ var script = {
|
|
|
2165
2258
|
onKeyDown(event) {
|
|
2166
2259
|
if (event.code === 'ArrowDown' && this.overlay) {
|
|
2167
2260
|
this.trapFocus(event);
|
|
2168
|
-
}
|
|
2169
|
-
else if (event.code === 'ArrowDown' && !this.overlay) {
|
|
2261
|
+
} else if (event.code === 'ArrowDown' && !this.overlay) {
|
|
2170
2262
|
this.overlayVisible = true;
|
|
2171
|
-
}
|
|
2172
|
-
else if (event.code === 'Escape') {
|
|
2263
|
+
} else if (event.code === 'Escape') {
|
|
2173
2264
|
if (this.overlayVisible) {
|
|
2174
2265
|
this.overlayVisible = false;
|
|
2175
2266
|
event.preventDefault();
|
|
2176
2267
|
}
|
|
2177
|
-
}
|
|
2178
|
-
else if (event.code === 'Tab') {
|
|
2268
|
+
} else if (event.code === 'Tab') {
|
|
2179
2269
|
if (this.overlay) {
|
|
2180
|
-
utils.DomHandler.getFocusableElements(this.overlay).forEach(el => el.tabIndex = '-1');
|
|
2270
|
+
utils.DomHandler.getFocusableElements(this.overlay).forEach((el) => (el.tabIndex = '-1'));
|
|
2181
2271
|
}
|
|
2182
2272
|
|
|
2183
2273
|
if (this.overlayVisible) {
|
|
@@ -2225,10 +2315,9 @@ var script = {
|
|
|
2225
2315
|
}
|
|
2226
2316
|
|
|
2227
2317
|
let innerHTML = '';
|
|
2318
|
+
|
|
2228
2319
|
if (this.responsiveOptions) {
|
|
2229
|
-
let responsiveOptions = [...this.responsiveOptions]
|
|
2230
|
-
.filter(o => !!(o.breakpoint && o.numMonths))
|
|
2231
|
-
.sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
|
|
2320
|
+
let responsiveOptions = [...this.responsiveOptions].filter((o) => !!(o.breakpoint && o.numMonths)).sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
|
|
2232
2321
|
|
|
2233
2322
|
for (let i = 0; i < responsiveOptions.length; i++) {
|
|
2234
2323
|
let { breakpoint, numMonths } = responsiveOptions[i];
|
|
@@ -2256,7 +2345,7 @@ var script = {
|
|
|
2256
2345
|
|
|
2257
2346
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
2258
2347
|
}
|
|
2259
|
-
|
|
2348
|
+
},
|
|
2260
2349
|
destroyResponsiveStyleElement() {
|
|
2261
2350
|
if (this.responsiveStyleElement) {
|
|
2262
2351
|
this.responsiveStyleElement.remove();
|
|
@@ -2267,19 +2356,18 @@ var script = {
|
|
|
2267
2356
|
computed: {
|
|
2268
2357
|
viewDate() {
|
|
2269
2358
|
let propValue = this.modelValue;
|
|
2359
|
+
|
|
2270
2360
|
if (propValue && Array.isArray(propValue)) {
|
|
2271
2361
|
if (this.isRangeSelection()) {
|
|
2272
2362
|
propValue = propValue[1] || propValue[0];
|
|
2273
|
-
}
|
|
2274
|
-
else if (this.isMultipleSelection()) {
|
|
2363
|
+
} else if (this.isMultipleSelection()) {
|
|
2275
2364
|
propValue = propValue[propValue.length - 1];
|
|
2276
2365
|
}
|
|
2277
2366
|
}
|
|
2278
2367
|
|
|
2279
2368
|
if (propValue && typeof propValue !== 'string') {
|
|
2280
2369
|
return propValue;
|
|
2281
|
-
}
|
|
2282
|
-
else {
|
|
2370
|
+
} else {
|
|
2283
2371
|
let today = new Date();
|
|
2284
2372
|
|
|
2285
2373
|
if (this.maxDate && this.maxDate < today) {
|
|
@@ -2309,25 +2397,31 @@ var script = {
|
|
|
2309
2397
|
];
|
|
2310
2398
|
},
|
|
2311
2399
|
panelStyleClass() {
|
|
2312
|
-
return [
|
|
2313
|
-
'p-datepicker-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2400
|
+
return [
|
|
2401
|
+
'p-datepicker p-component',
|
|
2402
|
+
this.panelClass,
|
|
2403
|
+
{
|
|
2404
|
+
'p-datepicker-inline': this.inline,
|
|
2405
|
+
'p-disabled': this.disabled,
|
|
2406
|
+
'p-datepicker-timeonly': this.timeOnly,
|
|
2407
|
+
'p-datepicker-multiple-month': this.numberOfMonths > 1,
|
|
2408
|
+
'p-datepicker-monthpicker': this.currentView === 'month',
|
|
2409
|
+
'p-datepicker-yearpicker': this.currentView === 'year',
|
|
2410
|
+
'p-datepicker-touch-ui': this.touchUI,
|
|
2411
|
+
'p-input-filled': this.$primevue.config.inputStyle === 'filled',
|
|
2412
|
+
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
2413
|
+
}
|
|
2414
|
+
];
|
|
2323
2415
|
},
|
|
2324
2416
|
months() {
|
|
2325
2417
|
let months = [];
|
|
2326
|
-
|
|
2418
|
+
|
|
2419
|
+
for (let i = 0; i < this.numberOfMonths; i++) {
|
|
2327
2420
|
let month = this.currentMonth + i;
|
|
2328
2421
|
let year = this.currentYear;
|
|
2422
|
+
|
|
2329
2423
|
if (month > 11) {
|
|
2330
|
-
month = month % 11 - 1;
|
|
2424
|
+
month = (month % 11) - 1;
|
|
2331
2425
|
year = year + 1;
|
|
2332
2426
|
}
|
|
2333
2427
|
|
|
@@ -2344,30 +2438,33 @@ var script = {
|
|
|
2344
2438
|
let week = [];
|
|
2345
2439
|
|
|
2346
2440
|
if (i == 0) {
|
|
2347
|
-
for (let j =
|
|
2441
|
+
for (let j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {
|
|
2348
2442
|
let prev = this.getPreviousMonthAndYear(month, year);
|
|
2349
|
-
|
|
2350
|
-
|
|
2443
|
+
|
|
2444
|
+
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) });
|
|
2351
2445
|
}
|
|
2352
2446
|
|
|
2353
2447
|
let remainingDaysLength = 7 - week.length;
|
|
2448
|
+
|
|
2354
2449
|
for (let j = 0; j < remainingDaysLength; j++) {
|
|
2355
|
-
week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),
|
|
2356
|
-
selectable: this.isSelectable(dayNo, month, year, false)});
|
|
2450
|
+
week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
|
|
2357
2451
|
dayNo++;
|
|
2358
2452
|
}
|
|
2359
|
-
}
|
|
2360
|
-
else {
|
|
2453
|
+
} else {
|
|
2361
2454
|
for (let j = 0; j < 7; j++) {
|
|
2362
2455
|
if (dayNo > daysLength) {
|
|
2363
2456
|
let next = this.getNextMonthAndYear(month, year);
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2457
|
+
|
|
2458
|
+
week.push({
|
|
2459
|
+
day: dayNo - daysLength,
|
|
2460
|
+
month: next.month,
|
|
2461
|
+
year: next.year,
|
|
2462
|
+
otherMonth: true,
|
|
2463
|
+
today: this.isToday(today, dayNo - daysLength, next.month, next.year),
|
|
2464
|
+
selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)
|
|
2465
|
+
});
|
|
2466
|
+
} else {
|
|
2467
|
+
week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
|
|
2371
2468
|
}
|
|
2372
2469
|
|
|
2373
2470
|
dayNo++;
|
|
@@ -2394,15 +2491,16 @@ var script = {
|
|
|
2394
2491
|
weekDays() {
|
|
2395
2492
|
let weekDays = [];
|
|
2396
2493
|
let dayIndex = this.$primevue.config.locale.firstDayOfWeek;
|
|
2494
|
+
|
|
2397
2495
|
for (let i = 0; i < 7; i++) {
|
|
2398
2496
|
weekDays.push(this.$primevue.config.locale.dayNamesMin[dayIndex]);
|
|
2399
|
-
dayIndex =
|
|
2497
|
+
dayIndex = dayIndex == 6 ? 0 : ++dayIndex;
|
|
2400
2498
|
}
|
|
2401
2499
|
|
|
2402
2500
|
return weekDays;
|
|
2403
2501
|
},
|
|
2404
2502
|
ticksTo1970() {
|
|
2405
|
-
return ((
|
|
2503
|
+
return ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000;
|
|
2406
2504
|
},
|
|
2407
2505
|
sundayIndex() {
|
|
2408
2506
|
return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0;
|
|
@@ -2420,8 +2518,7 @@ var script = {
|
|
|
2420
2518
|
|
|
2421
2519
|
if (this.currentYear < yearStart) {
|
|
2422
2520
|
$vm.currentYear = yearEnd;
|
|
2423
|
-
}
|
|
2424
|
-
else if (this.currentYear > yearEnd) {
|
|
2521
|
+
} else if (this.currentYear > yearEnd) {
|
|
2425
2522
|
$vm.currentYear = yearStart;
|
|
2426
2523
|
}
|
|
2427
2524
|
|
|
@@ -2430,13 +2527,13 @@ var script = {
|
|
|
2430
2527
|
}
|
|
2431
2528
|
|
|
2432
2529
|
return yearOptions;
|
|
2433
|
-
}
|
|
2434
|
-
else {
|
|
2530
|
+
} else {
|
|
2435
2531
|
return null;
|
|
2436
2532
|
}
|
|
2437
2533
|
},
|
|
2438
2534
|
monthPickerValues() {
|
|
2439
2535
|
let monthPickerValues = [];
|
|
2536
|
+
|
|
2440
2537
|
for (let i = 0; i <= 11; i++) {
|
|
2441
2538
|
monthPickerValues.push(this.$primevue.config.locale.monthNamesShort[i]);
|
|
2442
2539
|
}
|
|
@@ -2445,7 +2542,8 @@ var script = {
|
|
|
2445
2542
|
},
|
|
2446
2543
|
yearPickerValues() {
|
|
2447
2544
|
let yearPickerValues = [];
|
|
2448
|
-
let base = this.currentYear -
|
|
2545
|
+
let base = this.currentYear - (this.currentYear % 10);
|
|
2546
|
+
|
|
2449
2547
|
for (let i = 0; i < 10; i++) {
|
|
2450
2548
|
yearPickerValues.push(base + i);
|
|
2451
2549
|
}
|
|
@@ -2484,16 +2582,16 @@ var script = {
|
|
|
2484
2582
|
}
|
|
2485
2583
|
},
|
|
2486
2584
|
components: {
|
|
2487
|
-
|
|
2488
|
-
|
|
2585
|
+
CalendarButton: Button__default["default"],
|
|
2586
|
+
Portal: Portal__default["default"]
|
|
2489
2587
|
},
|
|
2490
2588
|
directives: {
|
|
2491
|
-
|
|
2589
|
+
ripple: Ripple__default["default"]
|
|
2492
2590
|
}
|
|
2493
2591
|
};
|
|
2494
2592
|
|
|
2495
2593
|
const _hoisted_1 = ["id"];
|
|
2496
|
-
const _hoisted_2 = ["id", "placeholder", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "readonly"];
|
|
2594
|
+
const _hoisted_2 = ["id", "placeholder", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly"];
|
|
2497
2595
|
const _hoisted_3 = ["id", "role", "aria-modal", "aria-label"];
|
|
2498
2596
|
const _hoisted_4 = { class: "p-datepicker-group-container" };
|
|
2499
2597
|
const _hoisted_5 = { class: "p-datepicker-header" };
|
|
@@ -2646,9 +2744,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2646
2744
|
? (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
2647
2745
|
key: 0,
|
|
2648
2746
|
ref: $options.inputRef,
|
|
2747
|
+
id: $props.inputId,
|
|
2649
2748
|
type: "text",
|
|
2650
2749
|
role: "combobox",
|
|
2651
|
-
id: $props.inputId,
|
|
2652
2750
|
class: ['p-inputtext p-component', $props.inputClass],
|
|
2653
2751
|
style: $props.inputStyle,
|
|
2654
2752
|
placeholder: $props.placeholder,
|
|
@@ -2659,12 +2757,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2659
2757
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
2660
2758
|
"aria-label": _ctx.ariaLabel,
|
|
2661
2759
|
inputmode: "none",
|
|
2662
|
-
|
|
2663
|
-
onFocus: _cache[1] || (_cache[1] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
2664
|
-
onBlur: _cache[2] || (_cache[2] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
2665
|
-
onKeydown: _cache[3] || (_cache[3] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
2760
|
+
disabled: $props.disabled,
|
|
2666
2761
|
readonly: !$props.manualInput,
|
|
2667
|
-
tabindex: 0
|
|
2762
|
+
tabindex: 0,
|
|
2763
|
+
onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args))),
|
|
2764
|
+
onClick: _cache[1] || (_cache[1] = (...args) => ($options.onInputClick && $options.onInputClick(...args))),
|
|
2765
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
2766
|
+
onBlur: _cache[3] || (_cache[3] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
2767
|
+
onKeydown: _cache[4] || (_cache[4] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args)))
|
|
2668
2768
|
}, $props.inputProps), null, 16, _hoisted_2))
|
|
2669
2769
|
: vue.createCommentVNode("", true),
|
|
2670
2770
|
($props.showIcon)
|
|
@@ -2688,7 +2788,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2688
2788
|
default: vue.withCtx(() => [
|
|
2689
2789
|
vue.createVNode(vue.Transition, {
|
|
2690
2790
|
name: "p-connected-overlay",
|
|
2691
|
-
onEnter: _cache[
|
|
2791
|
+
onEnter: _cache[68] || (_cache[68] = $event => ($options.onOverlayEnter($event))),
|
|
2692
2792
|
onAfterEnter: $options.onOverlayEnterComplete,
|
|
2693
2793
|
onAfterLeave: $options.onOverlayAfterLeave,
|
|
2694
2794
|
onLeave: $options.onOverlayLeave
|
|
@@ -2704,27 +2804,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2704
2804
|
role: $props.inline ? null : 'dialog',
|
|
2705
2805
|
"aria-modal": $props.inline ? null : 'true',
|
|
2706
2806
|
"aria-label": _ctx.$primevue.config.locale.chooseDate,
|
|
2707
|
-
onClick: _cache[
|
|
2708
|
-
onKeydown: _cache[
|
|
2709
|
-
onMouseup: _cache[
|
|
2807
|
+
onClick: _cache[65] || (_cache[65] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),
|
|
2808
|
+
onKeydown: _cache[66] || (_cache[66] = (...args) => ($options.onOverlayKeyDown && $options.onOverlayKeyDown(...args))),
|
|
2809
|
+
onMouseup: _cache[67] || (_cache[67] = (...args) => ($options.onOverlayMouseUp && $options.onOverlayMouseUp(...args)))
|
|
2710
2810
|
}, $props.panelProps), [
|
|
2711
2811
|
(!$props.timeOnly)
|
|
2712
2812
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
2713
2813
|
vue.createElementVNode("div", _hoisted_4, [
|
|
2714
2814
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.months, (month, groupIndex) => {
|
|
2715
2815
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
2716
|
-
|
|
2717
|
-
|
|
2816
|
+
key: month.month + month.year,
|
|
2817
|
+
class: "p-datepicker-group"
|
|
2718
2818
|
}, [
|
|
2719
2819
|
vue.createElementVNode("div", _hoisted_5, [
|
|
2720
2820
|
vue.renderSlot(_ctx.$slots, "header"),
|
|
2721
2821
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2722
2822
|
class: "p-datepicker-prev p-link",
|
|
2723
|
-
onClick: _cache[
|
|
2823
|
+
onClick: _cache[5] || (_cache[5] = (...args) => ($options.onPrevButtonClick && $options.onPrevButtonClick(...args))),
|
|
2724
2824
|
type: "button",
|
|
2725
|
-
onKeydown: _cache[
|
|
2825
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2726
2826
|
disabled: $props.disabled,
|
|
2727
|
-
"aria-label":
|
|
2827
|
+
"aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.prevDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.prevYear : _ctx.$primevue.config.locale.prevMonth
|
|
2728
2828
|
}, _hoisted_8, 40, _hoisted_6)), [
|
|
2729
2829
|
[vue.vShow, $props.showOtherMonths ? groupIndex === 0 : false],
|
|
2730
2830
|
[_directive_ripple]
|
|
@@ -2734,8 +2834,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2734
2834
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2735
2835
|
key: 0,
|
|
2736
2836
|
type: "button",
|
|
2737
|
-
onClick: _cache[
|
|
2738
|
-
onKeydown: _cache[
|
|
2837
|
+
onClick: _cache[7] || (_cache[7] = (...args) => ($options.switchToMonthView && $options.switchToMonthView(...args))),
|
|
2838
|
+
onKeydown: _cache[8] || (_cache[8] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2739
2839
|
class: "p-datepicker-month p-link",
|
|
2740
2840
|
disabled: $options.switchViewButtonDisabled,
|
|
2741
2841
|
"aria-label": _ctx.$primevue.config.locale.chooseMonth
|
|
@@ -2745,8 +2845,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2745
2845
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2746
2846
|
key: 1,
|
|
2747
2847
|
type: "button",
|
|
2748
|
-
onClick: _cache[
|
|
2749
|
-
onKeydown: _cache[
|
|
2848
|
+
onClick: _cache[9] || (_cache[9] = (...args) => ($options.switchToYearView && $options.switchToYearView(...args))),
|
|
2849
|
+
onKeydown: _cache[10] || (_cache[10] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2750
2850
|
class: "p-datepicker-year p-link",
|
|
2751
2851
|
disabled: $options.switchViewButtonDisabled,
|
|
2752
2852
|
"aria-label": _ctx.$primevue.config.locale.chooseYear
|
|
@@ -2762,17 +2862,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2762
2862
|
]),
|
|
2763
2863
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2764
2864
|
class: "p-datepicker-next p-link",
|
|
2765
|
-
onClick: _cache[
|
|
2865
|
+
onClick: _cache[11] || (_cache[11] = (...args) => ($options.onNextButtonClick && $options.onNextButtonClick(...args))),
|
|
2766
2866
|
type: "button",
|
|
2767
|
-
onKeydown: _cache[
|
|
2867
|
+
onKeydown: _cache[12] || (_cache[12] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2768
2868
|
disabled: $props.disabled,
|
|
2769
|
-
"aria-label":
|
|
2869
|
+
"aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.nextDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.nextYear : _ctx.$primevue.config.locale.nextMonth
|
|
2770
2870
|
}, _hoisted_15, 40, _hoisted_13)), [
|
|
2771
|
-
[vue.vShow, $props.showOtherMonths ? $props.numberOfMonths === 1 ? true :
|
|
2871
|
+
[vue.vShow, $props.showOtherMonths ? ($props.numberOfMonths === 1 ? true : groupIndex === $props.numberOfMonths - 1) : false],
|
|
2772
2872
|
[_directive_ripple]
|
|
2773
2873
|
])
|
|
2774
2874
|
]),
|
|
2775
|
-
($data.currentView ==='date')
|
|
2875
|
+
($data.currentView === 'date')
|
|
2776
2876
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
|
|
2777
2877
|
vue.createElementVNode("table", _hoisted_17, [
|
|
2778
2878
|
vue.createElementVNode("thead", null, [
|
|
@@ -2784,8 +2884,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2784
2884
|
: vue.createCommentVNode("", true),
|
|
2785
2885
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.weekDays, (weekDay) => {
|
|
2786
2886
|
return (vue.openBlock(), vue.createElementBlock("th", {
|
|
2787
|
-
scope: "col",
|
|
2788
2887
|
key: weekDay,
|
|
2888
|
+
scope: "col",
|
|
2789
2889
|
abbr: weekDay
|
|
2790
2890
|
}, [
|
|
2791
2891
|
vue.createElementVNode("span", null, vue.toDisplayString(weekDay), 1)
|
|
@@ -2810,15 +2910,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2810
2910
|
: vue.createCommentVNode("", true),
|
|
2811
2911
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(week, (date) => {
|
|
2812
2912
|
return (vue.openBlock(), vue.createElementBlock("td", {
|
|
2813
|
-
"aria-label": date.day,
|
|
2814
2913
|
key: date.day + '' + date.month,
|
|
2815
|
-
|
|
2914
|
+
"aria-label": date.day,
|
|
2915
|
+
class: vue.normalizeClass({ 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today })
|
|
2816
2916
|
}, [
|
|
2817
2917
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
|
|
2818
|
-
class: vue.normalizeClass({'p-highlight': $options.isSelected(date), 'p-disabled': !date.selectable}),
|
|
2918
|
+
class: vue.normalizeClass({ 'p-highlight': $options.isSelected(date), 'p-disabled': !date.selectable }),
|
|
2819
2919
|
onClick: $event => ($options.onDateSelect($event, date)),
|
|
2820
2920
|
draggable: "false",
|
|
2821
|
-
onKeydown: $event => ($options.onDateCellKeydown($event,date,groupIndex)),
|
|
2921
|
+
onKeydown: $event => ($options.onDateCellKeydown($event, date, groupIndex)),
|
|
2822
2922
|
"aria-selected": $options.isSelected(date)
|
|
2823
2923
|
}, [
|
|
2824
2924
|
vue.renderSlot(_ctx.$slots, "date", { date: date }, () => [
|
|
@@ -2847,8 +2947,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2847
2947
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
|
|
2848
2948
|
key: m,
|
|
2849
2949
|
onClick: $event => ($options.onMonthSelect($event, i)),
|
|
2850
|
-
onKeydown: $event => ($options.onMonthCellKeydown($event,i)),
|
|
2851
|
-
class: vue.normalizeClass(["p-monthpicker-month", {'p-highlight': $options.isMonthSelected(i)}])
|
|
2950
|
+
onKeydown: $event => ($options.onMonthCellKeydown($event, i)),
|
|
2951
|
+
class: vue.normalizeClass(["p-monthpicker-month", { 'p-highlight': $options.isMonthSelected(i) }])
|
|
2852
2952
|
}, [
|
|
2853
2953
|
vue.createTextVNode(vue.toDisplayString(m) + " ", 1),
|
|
2854
2954
|
($options.isMonthSelected(i))
|
|
@@ -2866,8 +2966,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2866
2966
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
|
|
2867
2967
|
key: y,
|
|
2868
2968
|
onClick: $event => ($options.onYearSelect($event, y)),
|
|
2869
|
-
onKeydown: $event => ($options.onYearCellKeydown($event,y)),
|
|
2870
|
-
class: vue.normalizeClass(["p-yearpicker-year", {'p-highlight': $options.isYearSelected(y)}])
|
|
2969
|
+
onKeydown: $event => ($options.onYearCellKeydown($event, y)),
|
|
2970
|
+
class: vue.normalizeClass(["p-yearpicker-year", { 'p-highlight': $options.isYearSelected(y) }])
|
|
2871
2971
|
}, [
|
|
2872
2972
|
vue.createTextVNode(vue.toDisplayString(y) + " ", 1),
|
|
2873
2973
|
($options.isYearSelected(y))
|
|
@@ -2881,23 +2981,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2881
2981
|
: vue.createCommentVNode("", true)
|
|
2882
2982
|
], 64))
|
|
2883
2983
|
: vue.createCommentVNode("", true),
|
|
2884
|
-
(($props.showTime
|
|
2984
|
+
(($props.showTime || $props.timeOnly) && $data.currentView === 'date')
|
|
2885
2985
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_32, [
|
|
2886
2986
|
vue.createElementVNode("div", _hoisted_33, [
|
|
2887
2987
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2888
2988
|
class: "p-link",
|
|
2889
2989
|
"aria-label": _ctx.$primevue.config.locale.nextHour,
|
|
2890
|
-
onMousedown: _cache[
|
|
2891
|
-
onMouseup: _cache[
|
|
2990
|
+
onMousedown: _cache[13] || (_cache[13] = $event => ($options.onTimePickerElementMouseDown($event, 0, 1))),
|
|
2991
|
+
onMouseup: _cache[14] || (_cache[14] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2892
2992
|
onKeydown: [
|
|
2893
|
-
_cache[
|
|
2894
|
-
_cache[
|
|
2895
|
-
_cache[
|
|
2993
|
+
_cache[15] || (_cache[15] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2994
|
+
_cache[17] || (_cache[17] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["enter"])),
|
|
2995
|
+
_cache[18] || (_cache[18] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["space"]))
|
|
2896
2996
|
],
|
|
2897
|
-
onMouseleave: _cache[
|
|
2997
|
+
onMouseleave: _cache[16] || (_cache[16] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2898
2998
|
onKeyup: [
|
|
2899
|
-
_cache[
|
|
2900
|
-
_cache[
|
|
2999
|
+
_cache[19] || (_cache[19] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3000
|
+
_cache[20] || (_cache[20] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2901
3001
|
],
|
|
2902
3002
|
type: "button"
|
|
2903
3003
|
}, _hoisted_36, 40, _hoisted_34)), [
|
|
@@ -2907,17 +3007,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2907
3007
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2908
3008
|
class: "p-link",
|
|
2909
3009
|
"aria-label": _ctx.$primevue.config.locale.prevHour,
|
|
2910
|
-
onMousedown: _cache[
|
|
2911
|
-
onMouseup: _cache[
|
|
3010
|
+
onMousedown: _cache[21] || (_cache[21] = $event => ($options.onTimePickerElementMouseDown($event, 0, -1))),
|
|
3011
|
+
onMouseup: _cache[22] || (_cache[22] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2912
3012
|
onKeydown: [
|
|
2913
|
-
_cache[
|
|
2914
|
-
_cache[
|
|
2915
|
-
_cache[
|
|
3013
|
+
_cache[23] || (_cache[23] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3014
|
+
_cache[25] || (_cache[25] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["enter"])),
|
|
3015
|
+
_cache[26] || (_cache[26] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["space"]))
|
|
2916
3016
|
],
|
|
2917
|
-
onMouseleave: _cache[
|
|
3017
|
+
onMouseleave: _cache[24] || (_cache[24] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2918
3018
|
onKeyup: [
|
|
2919
|
-
_cache[
|
|
2920
|
-
_cache[
|
|
3019
|
+
_cache[27] || (_cache[27] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3020
|
+
_cache[28] || (_cache[28] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2921
3021
|
],
|
|
2922
3022
|
type: "button"
|
|
2923
3023
|
}, _hoisted_39, 40, _hoisted_37)), [
|
|
@@ -2931,18 +3031,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2931
3031
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2932
3032
|
class: "p-link",
|
|
2933
3033
|
"aria-label": _ctx.$primevue.config.locale.nextMinute,
|
|
2934
|
-
onMousedown: _cache[
|
|
2935
|
-
onMouseup: _cache[
|
|
3034
|
+
onMousedown: _cache[29] || (_cache[29] = $event => ($options.onTimePickerElementMouseDown($event, 1, 1))),
|
|
3035
|
+
onMouseup: _cache[30] || (_cache[30] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2936
3036
|
onKeydown: [
|
|
2937
|
-
_cache[
|
|
2938
|
-
_cache[
|
|
2939
|
-
_cache[
|
|
3037
|
+
_cache[31] || (_cache[31] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3038
|
+
_cache[33] || (_cache[33] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["enter"])),
|
|
3039
|
+
_cache[34] || (_cache[34] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["space"]))
|
|
2940
3040
|
],
|
|
2941
3041
|
disabled: $props.disabled,
|
|
2942
|
-
onMouseleave: _cache[
|
|
3042
|
+
onMouseleave: _cache[32] || (_cache[32] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2943
3043
|
onKeyup: [
|
|
2944
|
-
_cache[
|
|
2945
|
-
_cache[
|
|
3044
|
+
_cache[35] || (_cache[35] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3045
|
+
_cache[36] || (_cache[36] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2946
3046
|
],
|
|
2947
3047
|
type: "button"
|
|
2948
3048
|
}, _hoisted_44, 40, _hoisted_42)), [
|
|
@@ -2952,18 +3052,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2952
3052
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2953
3053
|
class: "p-link",
|
|
2954
3054
|
"aria-label": _ctx.$primevue.config.locale.prevMinute,
|
|
2955
|
-
onMousedown: _cache[
|
|
2956
|
-
onMouseup: _cache[
|
|
3055
|
+
onMousedown: _cache[37] || (_cache[37] = $event => ($options.onTimePickerElementMouseDown($event, 1, -1))),
|
|
3056
|
+
onMouseup: _cache[38] || (_cache[38] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2957
3057
|
onKeydown: [
|
|
2958
|
-
_cache[
|
|
2959
|
-
_cache[
|
|
2960
|
-
_cache[
|
|
3058
|
+
_cache[39] || (_cache[39] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3059
|
+
_cache[41] || (_cache[41] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["enter"])),
|
|
3060
|
+
_cache[42] || (_cache[42] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["space"]))
|
|
2961
3061
|
],
|
|
2962
3062
|
disabled: $props.disabled,
|
|
2963
|
-
onMouseleave: _cache[
|
|
3063
|
+
onMouseleave: _cache[40] || (_cache[40] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2964
3064
|
onKeyup: [
|
|
2965
|
-
_cache[
|
|
2966
|
-
_cache[
|
|
3065
|
+
_cache[43] || (_cache[43] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3066
|
+
_cache[44] || (_cache[44] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2967
3067
|
],
|
|
2968
3068
|
type: "button"
|
|
2969
3069
|
}, _hoisted_47, 40, _hoisted_45)), [
|
|
@@ -2980,18 +3080,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2980
3080
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2981
3081
|
class: "p-link",
|
|
2982
3082
|
"aria-label": _ctx.$primevue.config.locale.nextSecond,
|
|
2983
|
-
onMousedown: _cache[
|
|
2984
|
-
onMouseup: _cache[
|
|
3083
|
+
onMousedown: _cache[45] || (_cache[45] = $event => ($options.onTimePickerElementMouseDown($event, 2, 1))),
|
|
3084
|
+
onMouseup: _cache[46] || (_cache[46] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2985
3085
|
onKeydown: [
|
|
2986
|
-
_cache[
|
|
2987
|
-
_cache[
|
|
2988
|
-
_cache[
|
|
3086
|
+
_cache[47] || (_cache[47] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3087
|
+
_cache[49] || (_cache[49] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["enter"])),
|
|
3088
|
+
_cache[50] || (_cache[50] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["space"]))
|
|
2989
3089
|
],
|
|
2990
3090
|
disabled: $props.disabled,
|
|
2991
|
-
onMouseleave: _cache[
|
|
3091
|
+
onMouseleave: _cache[48] || (_cache[48] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2992
3092
|
onKeyup: [
|
|
2993
|
-
_cache[
|
|
2994
|
-
_cache[
|
|
3093
|
+
_cache[51] || (_cache[51] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3094
|
+
_cache[52] || (_cache[52] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2995
3095
|
],
|
|
2996
3096
|
type: "button"
|
|
2997
3097
|
}, _hoisted_52, 40, _hoisted_50)), [
|
|
@@ -3001,18 +3101,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3001
3101
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
3002
3102
|
class: "p-link",
|
|
3003
3103
|
"aria-label": _ctx.$primevue.config.locale.prevSecond,
|
|
3004
|
-
onMousedown: _cache[
|
|
3005
|
-
onMouseup: _cache[
|
|
3104
|
+
onMousedown: _cache[53] || (_cache[53] = $event => ($options.onTimePickerElementMouseDown($event, 2, -1))),
|
|
3105
|
+
onMouseup: _cache[54] || (_cache[54] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
3006
3106
|
onKeydown: [
|
|
3007
|
-
_cache[
|
|
3008
|
-
_cache[
|
|
3009
|
-
_cache[
|
|
3107
|
+
_cache[55] || (_cache[55] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3108
|
+
_cache[57] || (_cache[57] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["enter"])),
|
|
3109
|
+
_cache[58] || (_cache[58] = vue.withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["space"]))
|
|
3010
3110
|
],
|
|
3011
3111
|
disabled: $props.disabled,
|
|
3012
|
-
onMouseleave: _cache[
|
|
3112
|
+
onMouseleave: _cache[56] || (_cache[56] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
3013
3113
|
onKeyup: [
|
|
3014
|
-
_cache[
|
|
3015
|
-
_cache[
|
|
3114
|
+
_cache[59] || (_cache[59] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3115
|
+
_cache[60] || (_cache[60] = vue.withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
3016
3116
|
],
|
|
3017
3117
|
type: "button"
|
|
3018
3118
|
}, _hoisted_55, 40, _hoisted_53)), [
|
|
@@ -3020,27 +3120,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3020
3120
|
])
|
|
3021
3121
|
]))
|
|
3022
3122
|
: vue.createCommentVNode("", true),
|
|
3023
|
-
($props.hourFormat=='12')
|
|
3123
|
+
($props.hourFormat == '12')
|
|
3024
3124
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_56, [
|
|
3025
3125
|
vue.createElementVNode("span", null, vue.toDisplayString($props.timeSeparator), 1)
|
|
3026
3126
|
]))
|
|
3027
3127
|
: vue.createCommentVNode("", true),
|
|
3028
|
-
($props.hourFormat=='12')
|
|
3128
|
+
($props.hourFormat == '12')
|
|
3029
3129
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_57, [
|
|
3030
3130
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
3031
3131
|
class: "p-link",
|
|
3032
3132
|
"aria-label": _ctx.$primevue.config.locale.am,
|
|
3033
|
-
onClick: _cache[
|
|
3133
|
+
onClick: _cache[61] || (_cache[61] = $event => ($options.toggleAMPM($event))),
|
|
3034
3134
|
type: "button",
|
|
3035
3135
|
disabled: $props.disabled
|
|
3036
3136
|
}, _hoisted_60, 8, _hoisted_58)), [
|
|
3037
3137
|
[_directive_ripple]
|
|
3038
3138
|
]),
|
|
3039
|
-
vue.createElementVNode("span", null, vue.toDisplayString($data.pm ?
|
|
3139
|
+
vue.createElementVNode("span", null, vue.toDisplayString($data.pm ? _ctx.$primevue.config.locale.pm : _ctx.$primevue.config.locale.am), 1),
|
|
3040
3140
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
3041
3141
|
class: "p-link",
|
|
3042
3142
|
"aria-label": _ctx.$primevue.config.locale.pm,
|
|
3043
|
-
onClick: _cache[
|
|
3143
|
+
onClick: _cache[62] || (_cache[62] = $event => ($options.toggleAMPM($event))),
|
|
3044
3144
|
type: "button",
|
|
3045
3145
|
disabled: $props.disabled
|
|
3046
3146
|
}, _hoisted_63, 8, _hoisted_61)), [
|
|
@@ -3055,14 +3155,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3055
3155
|
vue.createVNode(_component_CalendarButton, {
|
|
3056
3156
|
type: "button",
|
|
3057
3157
|
label: $options.todayLabel,
|
|
3058
|
-
onClick: _cache[
|
|
3158
|
+
onClick: _cache[63] || (_cache[63] = $event => ($options.onTodayButtonClick($event))),
|
|
3059
3159
|
class: "p-button-text",
|
|
3060
3160
|
onKeydown: $options.onContainerButtonKeydown
|
|
3061
3161
|
}, null, 8, ["label", "onKeydown"]),
|
|
3062
3162
|
vue.createVNode(_component_CalendarButton, {
|
|
3063
3163
|
type: "button",
|
|
3064
3164
|
label: $options.clearLabel,
|
|
3065
|
-
onClick: _cache[
|
|
3165
|
+
onClick: _cache[64] || (_cache[64] = $event => ($options.onClearButtonClick($event))),
|
|
3066
3166
|
class: "p-button-text",
|
|
3067
3167
|
onKeydown: $options.onContainerButtonKeydown
|
|
3068
3168
|
}, null, 8, ["label", "onKeydown"])
|
|
@@ -3107,7 +3207,7 @@ function styleInject(css, ref) {
|
|
|
3107
3207
|
}
|
|
3108
3208
|
}
|
|
3109
3209
|
|
|
3110
|
-
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
|
|
3210
|
+
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";
|
|
3111
3211
|
styleInject(css_248z);
|
|
3112
3212
|
|
|
3113
3213
|
script.render = render;
|