-
Notifications
You must be signed in to change notification settings - Fork 51
3873 ic time input ic change event detail includes current date #4213
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
base: develop
Are you sure you want to change the base?
3873 ic time input ic change event detail includes current date #4213
Conversation
doc changes for removal of date from the ic-time-input canary component
…mponent Refactored the Date object logic so it handles time as a string to prevent the date from appreaing in the console.
|
View your canary branch deployment here: https://mi6.github.io/ic-ui-kit/branches/3873-ic-time-input---ic-change-event-detail-includes-current-date/canary-web-components |
|
Cypress visual tests failed. |
jd3267
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in general this is a good effort and addresses the ticket however maybe over complicates it somewhat, resulting in some errors. The Date object should be kept allowing comparison of times (e.g in max and min time) rather than using the string. I've suggested a change which should output just the time part of the Date object
| this.selectedTime = value; | ||
| if (!onlyPeriodChanged) { | ||
| this.icTimeChange.emit({ | ||
| value: allSelected ? time : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you change this to value: allSelected && time ? time.toLocaleTimeString() : null, that should change return the time portion of the Date object
Summary of the changes
Refactored ic-time-input to remove the Date object so now it only shows the time as a string.
Related issue
#3873
Checklist
General
Testing
System modes