jdtcn / BlazorDateRangePicker

A Blazor component for choosing date ranges and dates
MIT License
182 stars 35 forks source link

Config doesn't work #75

Closed Tommy95271 closed 2 years ago

Tommy95271 commented 2 years ago

Hi, I tried this component and it's really good, lots of demo and properties to use, but when I tried config in Program.cs, it strangely didn't work, is there anything I misunderstood? I'm using .NET 6 and Blazor Server. builder.Services.AddDateRangePicker(config => { config.ApplyButtonClasses = "btn-success"; });

The Apply button is supposed to be green, yet it's still blue. image

jdtcn commented 2 years ago

Hi,

I tried to reproduce the problem, but the class is successfully applied for me. Maybe it doesn't work in combination with some DateRangePicker parameters? Are you using a custom buttons template? Custom button templates will not be affected by these options. Please share your picker code.

Tommy95271 commented 2 years ago

Sorry for bothering, it turns out was my mistake, I thought hot reload works on Program.cs, apparently it doesn't, the component works like a charm, thank you!