A simple library to display a horizontal calendar with custom start and end date, and mark events with a background

Overview

Horizontal Calendar View

A simple library to display a horizontal calendar with custom start and end date, and mark events with a background

Installation

Use Gradle to install the library, just add the following in app level build.gradle file

implementation 'com.github.akshittyagi205:HorizontalCalendarView:v1.0.0'

Usage

See the sample app to check the implementation of the library

In MainActivity.java

HorizontalCalendarView calendarView = findViewById(R.id.calendar);

Calendar starttime = Calendar.getInstance();
starttime.add(Calendar.MONTH,-6);

Calendar endtime = Calendar.getInstance();
endtime.add(Calendar.MONTH,6);

ArrayList datesToBeColored = new ArrayList();
datesToBeColored.add(Tools.getFormattedDateToday());

calendarView.setUpCalendar(starttime.getTimeInMillis(), 
                endtime.getTimeInMillis(), 
                datesToBeColored, 
                new HorizontalCalendarView.OnCalendarListener() {
            @Override
            public void onDateSelected(String date) {
                Toast.makeText(MainActivity.this,date+" clicked!",Toast.LENGTH_SHORT).show();
            }
        });

In activity_main.xml

<in.akshit.horizontalcalendar.HorizontalCalendarView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/calendar"/>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

You might also like...
A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.
A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.

SublimePicker A customizable view that provisions picking of a date, time & recurrence option, all from a single user-interface. You can also view 'Su

A date time range picker for android written in Kotlin
A date time range picker for android written in Kotlin

DateTimeRangePicker A date time range picker for android Usage Firstly, grab latest release of the library via JitPack. And note that, it utilizes Jod

An android app that can calculate the minutes from the date the user entered, till today.
An android app that can calculate the minutes from the date the user entered, till today.

AgeInMinutesApp An android app that can calculate the minutes from the date the user entered, till today. If user tap Select Date button, Calender dia

Material3 themed Jetpack Compose date & time pickers.
Material3 themed Jetpack Compose date & time pickers.

Compose material3 Date1 and Time pickers Highly customizable Jetpack Compose components with material3 support for date & time picking. Contents Lates

CalEF (Calendar Entry Formatter) : Select an entry in Android-Kalender and send/share the entry's content as human readable text.

CalEF (Calendar Entry Formatter) Select an entry in Android-Kalender and send/share the entry's content as human readable text. Usually calendar entri

A better calendar for Android
A better calendar for Android

Caldroid Caldroid is a fragment that display calendar with dates in a month. Caldroid can be used as embedded fragment, or as dialog fragment. User ca

Android calendar view (like card)
Android calendar view (like card)

android-calendar-card (Google Play Demo) Android calendar view (like card) Simple and easy to modify Author: Michał Szwarc #CalendarCardPager License

📅 Material Design Calendar compatible with API 11+
📅 Material Design Calendar compatible with API 11+

Prettier and simpler Material Design CalendarView MaterialCalendarView is a prettier and simpler, material design calendar that allows full customiz

📅 Material Design Calendar compatible with API 11+
📅 Material Design Calendar compatible with API 11+

Prettier and simpler Material Design CalendarView MaterialCalendarView is a prettier and simpler, material design calendar that allows full customiz

Comments
  • How to focus and show current date while showing this calender

    How to focus and show current date while showing this calender

    I want to show and focus on current day when this calender is shown, how to do it?

    From below code, it is focus/showing 1 Jan 2021, i want to show current day when the calender is shown, how?

    DatePickerTimeline datePickerTimeline = dialog.findViewById(R.id.datePickerTimeline);
           // Set a Start date (Default, 1 Jan 1970)
           Calendar today = Calendar.getInstance();
    
           datePickerTimeline.setInitialDate(2021, 0, 1);
           datePickerTimeline.setActiveDate(today);
           datePickerTimeline.setActivated(true); 
    
    opened by ashu9g 0
Releases(v1.0.0)
Owner
Akshit Tyagi
Hi, my name is Akshit and I'm an android application developer
Akshit Tyagi
Nepali Date Picker library in Jetpack compose for android with Date conversion from BS to AD and vice-versa

Nepali Date picker Converter - Re in Compose This is a re-work of Nepali Date Picker Converter in jetpack compose and kotlin. English Locale Nepali Lo

Kiran Gyawali 4 Dec 23, 2022
Standalone Android widget for picking a single date from a calendar view.

TimesSquare for Android Standalone Android widget for picking a single date from a calendar view. Usage Include CalendarPickerView in your layout XML.

Square 4.4k Dec 20, 2022
Android Compose wheel picker library based on LazyColumn in vertical and LazyRow in horizontal.

About Android Compose wheel picker library based on LazyColumn in vertical and LazyRow in horizontal. Gradle Sample Default Item size Unfocused count

null 6 Dec 22, 2022
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Raquib-ul Alam (Kanak) 3.4k Jan 3, 2023
Time-DatePicker - A Simple Time Date Picker With Kotlin

Time-DatePicker Time.DatePicker.mp4

Faysal Hossain 0 Jan 19, 2022
An android library which provides a compact calendar view much like the one used in google calenders.

CompactCalendarView CompactCalendarView is a simple calendar view which provides scrolling between months. It's based on Java's Date and Calendar clas

SundeepK 1.5k Dec 9, 2022
JetCalendarView - A calendar library for Jetpack Compose

JetCalendar WIP 2022 Hit Refresh! Calendar view ❤️ Jetpack Compose License Copyr

Anmol Verma 8 Aug 17, 2022
Pick a date or time on Android in style

Material DateTime Picker - Select a time/date in style Material DateTime Picker tries to offer you the date and time pickers as shown in the Material

null 4.7k Jan 4, 2023
A material Date Range Picker based on wdullaers MaterialDateTimePicker

Material Date and Time Picker with Range Selection Credits to the original amazing material date picker library by wdullaer - https://github.com/wdull

Supratim 1.3k Dec 14, 2022
A material Date Range Picker based on wdullaers MaterialDateTimePicker

Material Date and Time Picker with Range Selection Credits to the original amazing material date picker library by wdullaer - https://github.com/wdull

Supratim 1.3k Dec 14, 2022