Xabaril / Esquio

Esquio is a Feature Toggle Library for .NET Developers.
Apache License 2.0
428 stars 49 forks source link

FromToToggle throws exception if no To date specified #163

Closed Kronos11 closed 4 years ago

Kronos11 commented 4 years ago

I was expecting that this toggle would set some max date toggle if no date was provided. This unfortunately is not the case and it throws an exception. System.Collections.Generic.KeyNotFoundException: The given key 'To' was not present in the dictionary.

unaizorrilla commented 4 years ago

Well, To is a required parameter and the UI will show a required validation if is not set!

https://github.com/Xabaril/Esquio/blob/485b23ca8c413d1b7386c394a26e9ac0ba85823e/src/Esquio/Toggles/FromToToggle.cs#L14

I see your PR to set default DateTime.MaxValue for To parameter, let me some days (I'm on holidays) to checkout and review