# Date Picker allows disabled dates

**URL:** <https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136>\
**Category:** Radzen.Blazor Components\
**Created:** [December 29, 2020, 10:44am UTC](https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136 "2020-12-29T10:44:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggrewe](https://forum.radzen.com/user_avatar/forum.radzen.com/ggrewe/32/5959_2.png) [@ggrewe](https://forum.radzen.com/u/ggrewe)\
**Post date:** [December 29, 2020, 10:44am UTC](https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136/1 "2020-12-29T10:44:21Z")

</div>

With version 2.18.8, the DatePicker will allow a disabled date. The user is unable to select a disabled date, but a disabled date is selected when using the arrow buttons to move to the next month. See the screen shots for samples.

> ```
> public async Task SetFilingDate(DateTime filingDate)
> {
> FilingDate = filingDate;
> await Task.CompletedTask;
> }
> 
> public async Task SetYearEnd(DateTime yearEnd)
> {
> YearEnd = yearEnd;
> await Task.CompletedTask;
> }
> 
> protected void DisabledDates(DateRenderEventArgs args)
> {
> args.Disabled = (args.Date >= YearEnd);
> if (args.Date.Equals(FilingDate))
> {
> args.Attributes.Add("style", "background-color: var(--primary); border-color: white;");
> }
> }
> 
> ```

 ![2020-12-29_5-21-19](https://forum.radzen.com/uploads/default/original/2X/4/4daa1ec34a04d8da9572f7bc62a6fd989cfb24af.png)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [December 29, 2020, 12:45pm UTC](https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136/2 "2020-12-29T12:45:05Z")

</div>

We will do our best to provide fix for this in the next update.

---

<div class="post-metadata">

**Author:** ![ggrewe](https://forum.radzen.com/user_avatar/forum.radzen.com/ggrewe/32/5959_2.png) [@ggrewe](https://forum.radzen.com/u/ggrewe)\
**Post date:** [December 29, 2020, 1:28pm UTC](https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136/3 "2020-12-29T13:28:03Z")

</div>

No rush. And thank you!

---

<div class="post-metadata">

**Author:** ![kuebelkasten](https://forum.radzen.com/letter_avatar_proxy/v4/letter/k/838e76/32.png) [@kuebelkasten](https://forum.radzen.com/u/kuebelkasten)\
**Post date:** [July 9, 2021, 10:25am UTC](https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136/4 "2021-07-09T10:25:30Z")

</div>

Any news on this (as it still seems to be an issue)?

---

<div class="post-metadata">

**Author:** ![ashib.hoque](https://forum.radzen.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@ashib.hoque](https://forum.radzen.com/u/ashib.hoque)\
**Post date:** [September 23, 2021, 2:08pm UTC](https://forum.radzen.com/t/date-picker-allows-disabled-dates/6136/5 "2021-09-23T14:08:52Z")

</div>

Hello,

This issue still persists. Is there any news as to when this could be fixed? Many thanks.
