@transferwise/components 0.0.0-experimental-c0c64e3 → 0.0.0-experimental-b71afd5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4234,6 +4234,15 @@ class DateLookup extends PureComponent {
4234
4234
  onFocus();
4235
4235
  }
4236
4236
  };
4237
+ discard = () => {
4238
+ const {
4239
+ originalDate
4240
+ } = this.state;
4241
+ if (originalDate !== null) {
4242
+ this.props.onChange(originalDate);
4243
+ }
4244
+ this.close();
4245
+ };
4237
4246
  close = () => {
4238
4247
  const {
4239
4248
  onBlur
@@ -4435,7 +4444,7 @@ class DateLookup extends PureComponent {
4435
4444
  open: open,
4436
4445
  className: "tw-date-lookup-menu",
4437
4446
  position: Position.BOTTOM,
4438
- onClose: this.close,
4447
+ onClose: this.discard,
4439
4448
  children: this.getCalendar()
4440
4449
  })]
4441
4450
  });