joycode-hub / datepicker-plugin

Datepicker widget for Obsidian.
MIT License
7 stars 2 forks source link

Double click to accept selection #8

Closed theisjendal closed 2 months ago

theisjendal commented 2 months ago

This a feature request: It could be nice if a double click selected and accepted selection instead of having to click the accept button afterwards. When editing many dates it becomes annoying having to click on date and then click accept. Otherwise great plugin!

joycode-hub commented 2 months ago

I'm not sure I understand what you mean, do you mean double clicking the date input field to apply changes or double clicking the date text in the note itself?

theisjendal commented 2 months ago

Sorry for the confusion. When having selected a date in the calendar view while in source code mode, then there is an accept/decline option. Currently, if the accept is not clicked, the input is ignored. Instead, if it was possible to just double click the date in the calendar view to automatically accept the date that would be very nice!

Here is a picture showing the calendar and edit: image

If I click/enter the text field then the edit would be inserted when clicking outside of the popup. However, if only using the calendar view, then this edit is not made.

joycode-hub commented 2 months ago

Thanks for the clarification.

If I click/enter the text field then the edit would be inserted when clicking outside of the popup. However, if only using the calendar view, then this edit is not made.

As of release 0.3.22 and later, changing the date using the calendar and then clicking outside the popup will apply the change and close the popup as shown here:

screen_rec

Make sure you have this setting enabled in the Datepicker plugin settings to get this behaviour:

image

if it was possible to just double click the date in the calendar view to automatically accept the date that would be very nice!

This is not currently possible because the calendar I currently use in the plugin is the standard browser calendar which I do not have much control over and can't really watch for events.

theisjendal commented 2 months ago

Perfect! Thanks!