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

Fix date component default value #351

Closed
wants to merge 0 commits into from

Conversation

TwizzX17
Copy link
Contributor

Description

On init of the date component, the field should default to null if empty. This is done by the condition checking function isVoid and isEmptyString. The last update to this file forgot to add an else to the next set value, that would override the previous setValue to null. This would result in an error triggered by the validation on save event. Because empty string is an invalid date. This fix will ensure the date is null or valid string date.

Motivation and Context

How To Test This

Add a date field to your form, this could be a custom field to Leads, Accounts, Contacts ...
If the date input field is empty on init and not filled out (not marked as required), the date field will be considered invalid by the validator.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@SuiteBot
Copy link

SuiteBot commented Sep 29, 2023

CLA assistant check
All committers have signed the CLA.

@TwizzX17 TwizzX17 changed the title Fixed date component default value Fix date component default value Oct 2, 2023
@TwizzX17 TwizzX17 closed this Oct 3, 2023
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.

2 participants