muraee / Horizontal-Calendar

A material horizontal calendar view for Android based on RecyclerView
Apache License 2.0
1.21k stars 230 forks source link

How i disable previous day selection in calender? #139

Open sanjeet007 opened 2 years ago

sanjeet007 commented 2 years ago

Expected Behavior / Goal

?

Actual Behavior

?

Steps to Reproduce the Problem (sample code if possible)

1. 2. 3.

Specifications

  • Android Version:
  • Horizontal-Calendar Version:
SumitTrivedi073 commented 2 years ago

Replace this into your calendar activity

            Calendar startDate = Calendar.getInstance();
    startDate.add(Calendar.MONTH, 0);
    Calendar endDate = Calendar.getInstance();
    endDate.add(Calendar.MONTH, 2);
sanjeet007 commented 2 years ago

Replace this into your calendar activity

            Calendar startDate = Calendar.getInstance();
  startDate.add(Calendar.MONTH, 0);
  Calendar endDate = Calendar.getInstance();
  endDate.add(Calendar.MONTH, 2);

Will it disable previous day date selection without affecting calendar

sanjeet007 commented 2 years ago

Thanks for replying I will use this code

sanjeet007 commented 2 years ago

One more thing can i change its ui means can i customized it's layout of horizontal calendar view?

SumitTrivedi073 commented 2 years ago

yes you can but depend what you want to achieve

darias08 commented 1 year ago

Anyway how I can disable weekends and keep it between Monday through Friday?