Datetime Library: Event and Method Examples
Category: ExamplesThe Datetime module can create date picker instances, supporting single or multiple date selection, as well as date range selection. It also supports the use of lunar calendars and custom events.
Manual Value Input
By setting the manual:true parameter, automatic value filling can be disabled, requiring manual assignment using the b4Fill callback function.
This function supports two parameters:
Target Transfer
There are two targets: input/output target and positioning target. Use the transfer method to switch between targets. This method has three parameters:
The transfer method allows using the same bubble for multiple input nodes. To improve input efficiency, set confirmHide:false to keep the bubble open after clicking the confirm button.
Events Panel
Configure the events parameter to display the events sub-panel with the following options:
Quick Menu
The menu parameter configures quick menus as an array of objects (empty by default). Each menu item contains:
Complete Calendar
Expand both the left menu panel and right events container while making the date picker fill its container completely to form a comprehensive calendar view.
Parameter Updates
Use the update method to modify instance parameters with two arguments:
Instance Destruction and Initialization
Use the destroy method to remove an instance and init to reinitialize it for reuse.
