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

displayDate doesn't seem to work on the demo (or in the code) #623

Open
jamesdanielspassle opened this issue Feb 21, 2023 · 2 comments
Open

Comments

@jamesdanielspassle
Copy link

In the Demo (https://wondrous-crostata-172891.netlify.app/daytimePicker), the displayDate input doesn't seem to have any effect on the date-picker.

Similarly, when I've tried to use the property to update the date-picker in my .ts file, nothing happens.

This is the code in the src\app\demo\common\date-component.component.ts file that doesn't seem to accomplish anything:

  displayDateChanged(displayDate: Dayjs | string): void {
    this.displayDate = displayDate;
  }
@vlio20
Copy link
Owner

vlio20 commented Feb 22, 2023

Thanks @jamesdanielspassle, I will take a look during the weekend.

@jamesdanielspassle
Copy link
Author

jamesdanielspassle commented Mar 2, 2023

Hey! Did you have any thoughts on this one? We'd like to maintain a previous feature, which provided a "clear filters" button to clear the date on the datepicker. I can clear the date by manually deleting the date in the text input, but there doesn't appear to be another way of achieving it.

It looks like the method above should do it, but am I correct in thinking it's faulty?

EDIT: Actually, I think maybe we can achieve the same thing simply by applying:

    this.control.setValue(dayjsObject)

Would replacing that in your demo achieve the same result?

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

No branches or pull requests

2 participants