{"id":13493546,"url":"https://github.com/savvisingh/DateRangePicker","last_synced_at":"2025-03-28T11:32:56.185Z","repository":{"id":22089303,"uuid":"95206422","full_name":"savvisingh/DateRangePicker","owner":"savvisingh","description":"Date Range Picker is a Calendar Picker View to show a Customized Date Range Picker with improved UI and functionality to add subtitles to the dates","archived":false,"fork":false,"pushed_at":"2023-01-13T11:01:53.000Z","size":6396,"stargazers_count":788,"open_issues_count":45,"forks_count":163,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-09T10:47:28.868Z","etag":null,"topics":["datepicker","multiple-datepicker","range-datepicker","single-datepicker"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/savvisingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-23T09:40:43.000Z","updated_at":"2025-03-04T08:45:49.000Z","dependencies_parsed_at":"2023-01-14T13:14:34.750Z","dependency_job_id":null,"html_url":"https://github.com/savvisingh/DateRangePicker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savvisingh%2FDateRangePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savvisingh%2FDateRangePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savvisingh%2FDateRangePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savvisingh%2FDateRangePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/savvisingh","download_url":"https://codeload.github.com/savvisingh/DateRangePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246021508,"owners_count":20710946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datepicker","multiple-datepicker","range-datepicker","single-datepicker"],"created_at":"2024-07-31T19:01:16.390Z","updated_at":"2025-03-28T11:32:55.682Z","avatar_url":"https://github.com/savvisingh.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"Date Range Picker \n===================\nDate Range Picker is a Calendar Picker View to show a Customized Date Range Picker with improved UI and functionality to add subtitles to the dates\n\n[ ![Download](https://api.bintray.com/packages/savvisingh/maven/date-range-picker/images/download.svg?version=1.3) ](https://bintray.com/savvisingh/maven/date-range-picker/1.3/link)\n\nScreenshots\n-----------\n\u003cimg src=\"art/device-2019-05-22-131733.png\" alt=\"alt text\" width=\"250\" height=\"550\"\u003e \u003cimg src=\"art/device-2019-05-22-131815.png\" alt=\"alt text\" width=\"250\" height=\"550\"\u003e\n\nUsage\n-----\n* 1. Add Calendar Picker View to XML\n\n```xml\n\u003ccom.savvi.rangedatepicker.CalendarPickerView\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n        android:id=\"@+id/calendar_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scrollbarStyle=\"outsideOverlay\"\n        android:clipToPadding=\"false\"\n        app:tsquare_orientation_horizontal=\"false\"\n        app:tsquare_dividerColor=\"@color/transparent\"\n        app:tsquare_headerTextColor=\"@color/custom_header_text\"\n        /\u003e \n ```\n \n* 2. Initialize it in Java Class\n      \n```kotlin\n\n        calendar.init(lastYear.getTime(), nextYear.getTime()) //\n                .inMode(CalendarPickerView.SelectionMode.RANGE)\n                .withSelectedDate(new Date())\n// deactivates given dates, non selectable\n                .withDeactivateDates(list)\n// highlight dates in red color, mean they are aleady used.\n                .withHighlightedDates(arrayList)\n// add subtitles to the dates pass a arrayList of SubTitle objects with date and text\n                .withSubtitles(getSubtitle())\n                \n \n```\n * There are other Selection modes also SINGLE and MULTIPLE\n * Adding Deactivated Dates\n  User wont able to select these dates they will be deactivated.\n  for eg, if you dont want to provide services on Saturday and Sunday you can mark them deactivated in that case the date text color wil be grey..\n  \n * You can aslo specify custom month header style by passing SimpleDateFormat object in constructor\n   For eg. if we want to display year\n\n```java\n\ncalendar.init(lastYear.getTime(), nextYear.getTime(), new SimpleDateFormat(\"MMMM, YYYY\", Locale.getDefault()));\n\n ``` \n \n * Getting Selected Dates\nYou can get selected dates with the below function call when your user click finish or next button (which will you implement).\n\n```java\n\ncalendar.getSelectedDates()\n\n ``` \n \n * Specifying Horizontal Orientation\nYou can change the orientation of the CalendarPickerView by declaring it in xml view\n\n```xml\n\napp:tsquare_orientation_horizontal=\"true\"\n\n ``` \n \n  * Changing the colors of different states\n  \n  Add this attr in your colors.xml file to override the default colors\n       \n    \u003ccolor name=\"calendar_selected_day_bg\"\u003e#E91E63\u003c/color\u003e    \n    \u003ccolor name=\"calendar_selected_range_bg\"\u003e#8BC34A\u003c/color\u003e\n    \n    //this is for HighLighted dates\n    \u003ccolor name=\"calendar_unavailable_bg\"\u003e#F44336\u003c/color\u003e\n    \u003ccolor name=\"calendar_range_middle_unavailable_bg\"\u003e#F44336\u003c/color\u003e\n    \n    // this is for Deactivated dates\n    \u003ccolor name=\"calendar_range_middle_deactivated_bg\"\u003e#673AB7\u003c/color\u003e\n\n   For Changing the text colors please have a look at day_text_color.xml in rangepicker module and you can ovveride the resource colors to customize it\n\n\n Import DateRangePicker dependency\n------------------------------------\n\ndeclare it into your pom.xml\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.savvi.datepicker\u003c/groupId\u003e\n  \u003cartifactId\u003erangepicker\u003c/artifactId\u003e\n  \u003cversion\u003e1.3.0\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\nor into your build.gradle\n\n```groovy\ndependencies {\n    compile 'com.savvi.datepicker:rangepicker:1.3.0'\n}\n```\n\n License\n---------\n\n    Copyright 2017 Sarabjeet Singh\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavvisingh%2FDateRangePicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavvisingh%2FDateRangePicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavvisingh%2FDateRangePicker/lists"}