Check Mobile App
Read now

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

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

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

    Back to Home