Check Mobile App
Read now
Start a Project

How to block dates on Date Picker

Save

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.

css.php

The support is fast and do everything in their power to make it perfect. If you need customization it's also done right away. I had massive research to select Mobikul and now I'm sure it was the right one.

Igor Souza

Igor Souza

Talk to Sales

Global

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