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

Fixed #11709 Dates in custom fields not always stored in the correct format #11726

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented Aug 24, 2022

Description

The Purchase Date field and every custom field that is of type date in the asset edit/create form admits other date formats than our recommended 'yyyy-mm-dd`. As I think the datepicker should be enough to mitigate this issue, I only add a readonly tag to the HTML input, so no manually date is admitted and we always rely on the date picker element to input dates into the system UI.

Of course that I open to discuss other possible fixes.

Fixes #11709

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 7.4.16
  • MySQL version: 8.0.23
  • Webserver version: nginx/1.19.8
  • OS version: Debian 10

Checklist:

@snipe
Copy link
Owner

snipe commented Aug 24, 2022

👍 Thanks!

@Clyde-Li
Copy link

Clyde-Li commented Sep 1, 2022

Hi inietov, 'readonly' won't really fix the problem. And I'm still using API to update date info to my custom fields.
Can we have a validate check instead? Like this: Correctly determine if date string is a valid date in that format
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants