Shopify / javascript-utilities

A set of utilities for JavaScript and TypeScript projects at Shopify.
MIT License
45 stars 9 forks source link

Fixed getNewRange function #42

Closed nimzco closed 6 years ago

nimzco commented 6 years ago

getNewRange was returning the wrong result when comparing two different dates since they had different object references.

I'm using current utility functions to do better date comparison.

This change fixes the way we can use polaris Datepickers. Here is a PR that has a broken behaviour when using current polaris Datepicker: https://github.com/Shopify/web/pull/8192

ismail-syed commented 6 years ago

Can you please update the changelog before 🚢. Forgot to leave that in my approval comment 😓

nimzco commented 6 years ago

Oh shoe, sorry! I'll update that right away!

nimzco commented 6 years ago

https://github.com/Shopify/javascript-utilities/pull/43 🎉