-
Notifications
You must be signed in to change notification settings - Fork 79
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
refactor: use date as model for date picker #1135
Conversation
da2b66d
to
cac0ff2
Compare
cac0ff2
to
2cb0ab5
Compare
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.
lgtm
@@ -82,11 +84,11 @@ export class BasketDesiredDeliveryDateComponent implements OnInit, OnChanges { | |||
} | |||
|
|||
ngOnChanges(changes: SimpleChanges) { | |||
const previous = this.getDesiredDeliveryDate(changes.basket?.previousValue); | |||
const current = this.getDesiredDeliveryDate(changes.basket?.currentValue); | |||
|
|||
// we only care about the ddd, so only do anything if it has changed |
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 thougth ddd
was a typo 😅
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.
desired delivery date :D
Co-authored-by: max.kless@googlemail.com <max.kless@googlemail.com>
PR Type
[x] Refactoring (no functional changes, no API changes)
What Is the Current Behavior?
The date pickers use a fixed formatted string as model. If any follow up wants to do something with the date, it has to be parsed again.
What Is the New Behavior?
NgbDateNativeAdapter
.DateHelper
dissolved and methods fromDate
,NgbCalendar
anddate-fns
are used directly.Does this PR Introduce a Breaking Change?
[ ] Yes
[x] No
Other Information
AB#76130