Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: enhance calendar widget with time picker (nvim-orgmode#650)
* feat: implement time picker To make it more convenient to scheduled dates with particular times extends the existing date picker with a time picker. - t adds a time and jumps to the time picker - j and k decrease or increase the time, counts are supported - h and l determine if the time is shifted about an hour, 10 minutes or 5 minutes - T clears the time - Esc leaves the time picker first and pressed secondly the date picker * feat(date): add default to 'Enter date' When entering the date via direct input, provide the currently selected date as default value. * chore: fix warnings in calendar * fix: jump to descrete 10 or 5 minute steps When adjusting an odd minute value, we first want to jump to the next flat 10 or 5 minute value. * feat: make minute steps configurable Because it's a matter of preference, in which steps the user want's to jump through minutes, we make it configurable. * feat: highlight currently selected date * refactor: extract date highlighting into function * feat: update date selection regularly * feat: round minutes on adjusting hours * fix: show time picker also when changing date * fix: enable clear time keymap consistently To be able to clear times if no timestamp was set when the picker was loaded, we need to set the clear-time keymapping during rerendering of time. * refactor: integrate highlights into new function * fix: allow to switch back to day selection * feat: overhaul config options - wrap everything into calendar - cleanup names - use boolean "start_from_sunday" * doc: add some docs for the config options * doc: fix typo --------- Co-authored-by: Sebastian Flügge <[email protected]>
- Loading branch information