#CX-20457: Date Time picker: fix localised date format and disable user typing#2010
Open
RiamLoddy wants to merge 6 commits intomomentum-design:mainfrom
Open
#CX-20457: Date Time picker: fix localised date format and disable user typing#2010RiamLoddy wants to merge 6 commits intomomentum-design:mainfrom
RiamLoddy wants to merge 6 commits intomomentum-design:mainfrom
Conversation
RiamLoddy
commented
Jul 16, 2025
| id=${this.htmlId} | ||
| role=${this.role} | ||
| placeholder=${this.placeholder} | ||
| ?readonly=${this.readOnly || this.disabled} |
Contributor
Author
There was a problem hiding this comment.
the reson i added this new allowUserTextInput prop instead of just using readOnly is that readOnly also affects styling!
RiamLoddy
commented
Jul 16, 2025
| placeholder=${this.getPlaceHolderString()} | ||
| value=${ifDefined(this.value ?? undefined)} | ||
| value=${this.displayValue ?? ifDefined(this.value ?? undefined)} | ||
| .allowUserTextInput=${this.allowUserTextInput} |
Contributor
Author
There was a problem hiding this comment.
chatting with James N and we agreed to disable user text input when using localised dates
RiamLoddy
commented
Jul 16, 2025
| maxDate=${ifDefined(this.maxDate)} | ||
| value=${ifDefined(this.value)} | ||
| .useISOFormat=${this.useISOFormat} | ||
| displayValue=${ifDefined(this.displayValue)} |
Contributor
Author
There was a problem hiding this comment.
using disaplyValue instead of value allows us to sidestep all the awkward issues with the pickers attempting to interpret their own value as DateTime objects (which won't work for localised dates!)
| aria-label=${ifDefined(this.controlButtons.apply?.ariaLabel)} | ||
| ?disabled=${this.controlButtons.apply?.disabled ?? false} | ||
| @click=${this.onApplyClick} | ||
| @click=${this.controlButtons.apply?.disabled ? {} : this.onApplyClick} |
Collaborator
There was a problem hiding this comment.
use @button-click instead
AlanSpillane
previously approved these changes
Jul 16, 2025
Closed
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots:
Before (If applicable):
After:
Types of changes
Checklist: