aminography / PrimeDatePicker

PrimeDatePicker is a tool that provides picking a single day, multiple days, and a range of days.
Apache License 2.0
472 stars 52 forks source link

How in range calendar highlight "From" date at start? #41

Closed Pirokar closed 3 years ago

Pirokar commented 3 years ago

When calendar starting, I want to see already picked "from" date.

aminography commented 3 years ago

You could do it using initiallyPickedRangeDays passing the similar start day and end day. However, I've added a better feature for this. Please update the library to version 3.3.1 then you'll be able to specify the start day using initiallyPickedStartDay. For example:

val datePicker = PrimeDatePicker.bottomSheetWith(today)
        .pickRangeDays(rangeDaysPickCallback)
        .initiallyPickedStartDay(an_Instance_of_prime_calendar_as_start_day)  // <--
        .build()

datePicker.show(supportFragmentManager, "SOME_TAG")