Visitar URL original
DatePicker dateChange event not triggered on iOS · Issue #8264 · NativeScript/NativeScript · GitHub
Skip to content

DatePicker dateChange event not triggered on iOS #8264

Description

@bernica

Describe the bug
When opening the date picker with a selected Date different than today, changing the selected date to today doesn't update the date picker's date nor it triggers a date change event.

Draft PR open at #8263

Activity

  1. NickIliev commented on Jan 21, 2020

    @NickIliev
    Contributor

    @bernica thank you for the contribution - you need to sign the CLA so we could merge the PR

  2. vtrifonov commented on Jan 23, 2020

    @vtrifonov
    Contributor

    @bernica can you, please, provide a playground example for that as I cannot reproduce it? Here's what I'm testing - https://play.nativescript.org/?template=play-ng&id=BTNd3H.

  3. bernica commented on Jan 23, 2020

    @bernica
    ContributorAuthor

    @vtrifonov I'm initializing the date picker like:

    onPickerLoaded(args: any) {
      this.datePicker = <DatePicker>args.object;
      this.datePicker.date = someDate;
    

    and within the view:

    <DatePicker (loaded)="onPickerLoaded($event)" (dateChange)="onDateChanged($event)"></DatePicker>
    
  4. vtrifonov commented on Jan 23, 2020

    @vtrifonov
    Contributor

    I still cannot reproduce it: https://play.nativescript.org/?template=play-ng&id=jto0xk . Can you create a playground sample to show that? I'm setting the date to a date in the past, then either programmatically or manually changing the date to today always trigger the onDateChanged event.

  5. vtrifonov commented on Jan 27, 2020

    @vtrifonov
    Contributor

    @bernica could you, please, provide a playground demo or a sample app with the issue, as I cannot reproduce it?

  6. bernica commented on Jan 27, 2020

    @bernica
    ContributorAuthor

    @vtrifonov https://play.nativescript.org/?template=play-ng&id=hNo33P&v=2 when loaded the selected date is tomorrow, and changing it to today's date doesn't trigger the dateChange event (in which I log to the console).

  7. vtrifonov commented on Jan 27, 2020

    @vtrifonov
    Contributor

    I see now! Thanks, it makes sense now! Are you going to add something else to the PR as it is in Draft?

  8. bernica commented on Jan 27, 2020

    @bernica
    ContributorAuthor

    I won't be able to add anything more as I lack time

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions