Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to add timeline items with times #3014

Merged
merged 2 commits into from
May 3, 2023

Conversation

tillprochaska
Copy link
Contributor

@tillprochaska tillprochaska commented Apr 26, 2023

FtM supports times in date properties (see docs), but when adding items to a timeline in Aleph, you can’t add a time.

Additionally, if a timeline contains an item with a datetime value, an unhandled error occurs when switching to the chart view.

This PR fixes both issues. When adding a new timeline item, the form now allows entering values like 2023-05-02T00:00:00 or 2023-05-02 00:00.

When parsing those dates, we now simply ignore the time part. This also ensures that the chart view renders successfully.

Closes #3009

To do:

  • Use the same date regex for HTML pattern attribute in form an for parsing in ImpreciseDate?

@tillprochaska tillprochaska linked an issue Apr 26, 2023 that may be closed by this pull request
@tillprochaska tillprochaska force-pushed the fix/3009-fix-datetime-values-timelines branch from ace1c14 to 12acac8 Compare April 26, 2023 15:27
@tillprochaska tillprochaska marked this pull request as ready for review May 2, 2023 08:56
Copy link
Contributor

@Rosencrantz Rosencrantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. Thanks Till

@Rosencrantz Rosencrantz merged commit cd06a7e into develop May 3, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Timelines do not support adding datetime values
2 participants