dadi / publish

Publish provides beautiful editorial interfaces for the management of content within API
https://dadi.cloud/en/publish
64 stars 13 forks source link

Fix a few minor datetime bugs #757

Closed ohmoses closed 5 years ago

ohmoses commented 5 years ago

I put a few fixes together into a single PR, because they're tiny.

Bugs fixed:

  1. When manually typing a date into a date input field, the app would go into an infinite loop and freeze.
  2. When manually typing the date, after going from an invalid value to a valid one, the cursor would jump to the end of the input.
  3. The date input field would not allow deleting the value completely.

Also, I fixed an unrelated potential bug in TextInput (in fortunately otherwise unused code):

const {oldHeightType} = oldProps

changed to

const {heightType: oldHeightType} = oldProps