Browse Source

Setting min/max date before refreshing wheel

master
Henning Hall 6 years ago
committed by GitHub
parent
commit
633d237b82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      android/src/main/java/com/henninghall/date_picker/DatePickerManager.java

+ 5
- 5
android/src/main/java/com/henninghall/date_picker/DatePickerManager.java View File

@ -90,16 +90,16 @@ public class DatePickerManager extends SimpleViewManager {
@Override @Override
protected void onAfterUpdateTransaction(PickerView view) { protected void onAfterUpdateTransaction(PickerView view) {
super.onAfterUpdateTransaction(view);
// Refresh which options are available. Should happen before updating the date
view.updateDisplayValuesIfNeeded();
super.onAfterUpdateTransaction(view);
TimeZone timeZone = utc ? TimeZone.getTimeZone("UTC") : TimeZone.getDefault(); TimeZone timeZone = utc ? TimeZone.getTimeZone("UTC") : TimeZone.getDefault();
view.setTimeZone(timeZone); view.setTimeZone(timeZone);
view.setDate(Utils.isoToCalendar(date, timeZone));
view.setMinimumDate(Utils.isoToCalendar(minimumDate, timeZone)); view.setMinimumDate(Utils.isoToCalendar(minimumDate, timeZone));
view.setMaximumDate(Utils.isoToCalendar(maximumDate, timeZone)); view.setMaximumDate(Utils.isoToCalendar(maximumDate, timeZone));
// Refresh which options are available. Should happen before updating the date
view.updateDisplayValuesIfNeeded();
view.setDate(Utils.isoToCalendar(date, timeZone));
} }
public Map getExportedCustomBubblingEventTypeConstants() { public Map getExportedCustomBubblingEventTypeConstants() {

Loading…
Cancel
Save