question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: onDateChange callback in not being called for `type` time

See original GitHub issue

Bug description Currently onDateChange callback is being called only for date and datetime. But for time nothing happens and callback not being called

See code:

handleDatePicked = (date) => {
    // some code
    log('handleDatePicked date changed', date);
};

render() {
    return (
        <DatePicker
          date={new Date()}
          mode={'time'}
          onDateChange={this.handleDatePicked}
          locale={'en_GB'}
        />
    );
  }

Expected behavior onDateChange to be called for each mode time, date, datetime

Android emulator - Nexus_5X_API_28_x86 :

  • OS: [Android]
  • React Native version [e.g. 0.60.4]
  • react-native-date-picker version [e.g. 2.7.0]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
olegmilancommented, Sep 18, 2019

Thanks for reporting this, I will have a look at it!

After investigation, I found that onDateChange is not being called when locale param is specified when mode: time

4reactions
henninghallcommented, Sep 17, 2019

Thanks for reporting this, I will have a look at it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why OnDateChangeListener callback is not being called on ...
Try This code it is working.. // Creating dialog @Override protected Dialog onCreateDialog(int id) { c = Calendar.
Read more >
CalendarView.OnDateChangeListener - Android Developers
... int month, int dayOfMonth). Called upon change of the selected day. ... No recommendations at this time. Try signing in to your...
Read more >
DatePickerIOS - React Native
onDateChange ​. Date change handler. This is called when the user changes the date or time in the UI. The first and only...
Read more >
react-native-calendar-picker - npm
Callback when a date is selected. Returns Moment date as first param; START_DATE or END_DATE as second param. onMonthChange, Function ...
Read more >
Callback in Native module not being called? : r/reactnative
I'm working on an app for payment machines that use Android (7.1), with it you are able to pay with credit card. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found