How to block dates on Date Picker


If you looking to block date on the Android date picker then don’t waste your time it’s not possible. There is no built-in feature by Android date picker to block dates. I am not talking about the past dates or the future dates. That can be easily done using setMinDate() or setMaxDate(). But to block specific dates or maybe a particular day in every week. In this case, you will have to use a custom date picker and wdullaer’s MaterialDateTimePicker provides a simple to do it.

Let’s say you want to block a specific date “25/06/2020”

First, you need to add the dependency in your module level gradle

Now instead of Android Date Picker, you will have to use wdullaer’s MaterialDateTimePicker.

That’s all !!! You can add as many Calender items in the list and block all the specific dates.

Thank you very much. This is Vedesh Kumar signing off.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


The results provided were above our expectations both in deliverability timeline as well as operation. They are a top-notch company with many resources and a company we feel honoured to work with again!

Lee Seward

Lee Seward

Founder, Gro-Connect

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home