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

If no time set after preview node set default time #4046

Merged
merged 5 commits into from
Oct 31, 2023

Conversation

dgading
Copy link
Member

@dgading dgading commented Oct 26, 2023

fixes #4045

When using the Preview feature a #default_value is set when returning to the form. It seems like this is causing the error in the form.

When saving the node or previewing the node, the FlexibleDateTime:valueCallback method correctly sets the time. When navigating back to the form, the default value for time was an empty string. I'm guessing this callback doesn't set form_state so checking to see if there is a default value and no time set, we can set the time the same as in the previous conditional.

@jastraat jastraat self-requested a review October 30, 2023 18:11
Copy link
Contributor

@jastraat jastraat left a comment

Choose a reason for hiding this comment

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

LGTM!

@janette janette merged commit c8cd726 into 2.x Oct 31, 2023
@janette janette deleted the save-dataset-without-time branch October 31, 2023 19:37
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.

When using the preview button, Date Modified requires a time to save
3 participants