jdtcn / BlazorDateRangePicker

A Blazor component for choosing date ranges and dates
MIT License
186 stars 34 forks source link

Include the possibility of a "Clear" button? #17

Closed christian-ruud closed 4 years ago

christian-ruud commented 4 years ago

Awsome component. It would be great if you could include the option of having a "Clear"-button along with "Apply" and "Cancel" that will set the selected range back to NULL.

leninator commented 4 years ago

+1 for this.

One thing I thought would be to use the type="search" rather than type="text". You then get the nice little clear button in the textbox by default. However this does cause the popup for the date picker and does not reset any bound values.

jdtcn commented 4 years ago

Hello, @christian-ruud!

I've added ButtonsTemplate property in 2.4.0 version, so you can customize picker buttons. See example for your scenario with clear button in readme file.