Natural language input for dates

Possibly a plug-in or at least a custom component to go with a date input, which allows you to type a date (in your format of choice) based on a chosen language.

The todo-application Todoist does this really well, and it is a joy to input dates there.

Of course, part of the user experience in Todoist comes from the fact that you can type the due date and time in the same text box as you type your todo:

Bake bread tom at 1a

Becomes the todo: Bake bread, with a date tomorrow, at 13.00

Take out the recycling every sunday evening

Becomes the todo: Take out the recycling, which repeats every sunday at 18.00

A true pleasure to use, with two clear types of feedback that the system understands you:

  • the date and time parts like tomorrow at 5p are highlighted in the text input as you type
  • the date input with a date picker below the text input also updates with a structured date like 2021-05-13 17:00

Chrono seems like a widely used and adopted system for exactly this, written in Javascript, perfect for this purpose.

To support Norwegian, we could write a custom parser and make a pull request to the official package.

References

Chrono A natural language date parser in Javascript. https://github.com/wanasit/chrono

See nlp, sanity, dates, language, ux, ui