This panel field for Kirby is a better time picker than the default supplied with Kirby.
License: MIT
If not already existing, add a new fields
folder to your site
directory. Then copy or link this repositories whole content in a new pikatime
folder there. Afterwards, your directory structure should look like this:
site/
fields/
pikatime/
assests/
pikatime.php
If you would prefer to use a Git Submodule (which is more elegant in my opinion) you may follow along like this.
$ cd your/project/root
$ git submodule add https://github.com/jayshua/kirby-pikatime.git site/fields/pikatime
fields:
time:
label: Event Time
type: pikatime
mode: 12
The mode
property chooses whether the picker should display in 12 hour or 24 hour mode.
The pikatime field only saves time in basic 24-hour format. You can use the PHP date/time functions to format them as desired. See strtotime and Date/Time Functions on the PHP website.
This is really just a note for me
To build (in assets/js):
webpack pikatime.js --output-filename build.js -w