All Projects β†’ lopspower β†’ Lazydatepicker

lopspower / Lazydatepicker

Licence: apache-2.0
LazyDatePicker an alternative to the native Android Date Picker πŸ“…

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Lazydatepicker

skwas-cordova-plugin-datetimepicker
Cordova Plugin for showing a native date, time or datetime picker.
Stars: ✭ 37 (-89.78%)
Mutual labels:  datepicker
D2pdatepicker
Elegant and Easy-to-Use iOS Swift Date Picker
Stars: ✭ 280 (-22.65%)
Mutual labels:  datepicker
Datepickercell
πŸ“… Inline/Expanding date picker for table views.
Stars: ✭ 315 (-12.98%)
Mutual labels:  datepicker
Calendar
A calendar picker component, based on jQuery.
Stars: ✭ 49 (-86.46%)
Mutual labels:  datepicker
Svelte Calendar
A lightweight datepicker with neat animations and a unique UX.
Stars: ✭ 279 (-22.93%)
Mutual labels:  datepicker
Flutter Cupertino Date Picker
Flutter cupertino style date picker.
Stars: ✭ 293 (-19.06%)
Mutual labels:  datepicker
wp-datepicker-styling
jQuery UI Datepicker styling to match WordPress color schemes
Stars: ✭ 78 (-78.45%)
Mutual labels:  datepicker
Datetimepicker
jQuery Plugin Date and Time Picker
Stars: ✭ 3,402 (+839.78%)
Mutual labels:  datepicker
Saturn Datepicker
Angular Material Datepicker with range selection
Stars: ✭ 280 (-22.65%)
Mutual labels:  datepicker
Spinnerdatepicker
A styleable DatePicker for Android using the old spinner style (NumberPickers)
Stars: ✭ 314 (-13.26%)
Mutual labels:  datepicker
vue-datetime-picker
vue-datetime-picker / vueζ—Άι—΄ζ—₯ζœŸι€‰ζ‹©ε™¨
Stars: ✭ 16 (-95.58%)
Mutual labels:  datepicker
Datepicker
Android DatePicker
Stars: ✭ 252 (-30.39%)
Mutual labels:  datepicker
Primedatepicker
PrimeDatePicker is a tool that provides picking a single day, multiple days, and a range of days.
Stars: ✭ 292 (-19.34%)
Mutual labels:  datepicker
angular-eonasdan-datetimepicker
A wrapper directive around the Eonasdan Datepicker v4 component.
Stars: ✭ 63 (-82.6%)
Mutual labels:  datepicker
Vue Functional Calendar
Vue.js Functional Calendar | Component/Package
Stars: ✭ 314 (-13.26%)
Mutual labels:  datepicker
ionic4-datepicker
Ionic 4 Datepicker component
Stars: ✭ 78 (-78.45%)
Mutual labels:  datepicker
Vue Datepicker Local
A Beautiful Datepicker Component For Vue2
Stars: ✭ 282 (-22.1%)
Mutual labels:  datepicker
Rkcalendar
SwiftUI Simple Calendar / Date Picker for iOS
Stars: ✭ 349 (-3.59%)
Mutual labels:  datepicker
Scrollabledatepicker
Yet another datepicker for iOS
Stars: ✭ 326 (-9.94%)
Mutual labels:  datepicker
Pickerjs
⚠️ [Deprecated] No longer maintained. JavaScript date time picker.
Stars: ✭ 299 (-17.4%)
Mutual labels:  datepicker

LazyDatePicker

sample

Platform API Download
Android Weekly Twitter

This is an Android project to offer an alternative to the native Android Date Picker.

Android app on Google Play

USAGE

To make a lazy date picker add LazyDatePicker in your layout XML and add LazyDatePicker library in your project or you can also grab it via Gradle:

implementation 'com.mikhaellopez:lazydatepicker:1.0.6'

XML

<com.mikhaellopez.lazydatepicker.LazyDatePicker
    android:id="@+id/lazyDatePicker"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:ldp_text_color="@color/primary"
    app:ldp_hint_color="@color/accent"
    app:ldp_date_format="mm-dd-yyyy" />

You must use the following properties in your XML to change your LazyDatePicker.

Properties Type Default
app:ldp_text_color color BLACK
app:ldp_hint_color color GRAY
app:ldp_date_format mm-dd-yyyy or dd-mm-yyyy mm-dd-yyyy
app:ldp_show_full_date boolean true

KOTLIN

lazyDatePicker.setDateFormat(LazyDatePicker.DateFormat.MM_DD_YYYY)
lazyDatePicker.setMinDate(minDate)
lazyDatePicker.setMaxDate(maxDate)

// The date when is selected
lazyDatePicker.setOnDatePickListener { dateSelected ->
    //...
}

// True or false when date is selected
lazyDatePicker.setOnDateSelectedListener { dateSelected ->
    //...
}

JAVA

LazyDatePicker lazyDatePicker = findViewById(R.id.lazyDatePicker);
lazyDatePicker.setDateFormat(LazyDatePicker.DateFormat.MM_DD_YYYY);
lazyDatePicker.setMinDate(minDate);
lazyDatePicker.setMaxDate(maxDate);

lazyDatePicker.setOnDatePickListener(new LazyDatePicker.OnDatePickListener() {
    @Override
    public void onDatePick(Date dateSelected) {
        //...
    }
});

lazyDatePicker.setOnDateSelectedListener(new LazyDatePicker.OnDateSelectedListener() {
    @Override
    public void onDateSelected(Boolean dateSelected) {
        //...
    }
});

LOCAL DATE

You can used LazyLocalDatePicker instead of LazyDatePicker to have all method with LocalDate instead of Date.

XML:

<com.mikhaellopez.lazydatepicker.LazyLocalDatePicker
    android:id="@+id/lazyDatePicker"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:ldp_text_color="@color/primary"
    app:ldp_hint_color="@color/accent"
    app:ldp_date_format="mm-dd-yyyy" />

KOTLIN:

lazyLocalDatePicker.setDateFormat(LazyDatePicker.DateFormat.MM_DD_YYYY)
lazyLocalDatePicker.setMinLocalDate(minDate)
lazyLocalDatePicker.setMaxLocalDate(maxDate)

// The localdate when is selected
lazyLocalDatePicker.setOnLocalDatePickListener { localDateSelected ->
    //...
}

// True or false when date is selected
lazyLocalDatePicker.setOnLocalDateSelectedListener { dateSelected ->
    //...
}

OVERRIDE

You can override day, month & year if you want like this in your strings.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
    <string name="ldp_day" tools:override="true">D</string>
    <string name="ldp_month" tools:override="true">M</string>
    <string name="ldp_year" tools:override="true">Y</string>
</resources>

You can also change the design of the picker by changing the dimensions like this in your dimens.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
    <dimen name="lazy_date_picker_width_case" tools:override="true">12dp</dimen>
    <dimen name="lazy_date_picker_height_focus" tools:override="true">2.5dp</dimen>
    <dimen name="lazy_date_picker_width_margin" tools:override="true">1dp</dimen>
    <dimen name="lazy_date_picker_width_space" tools:override="true">6dp</dimen>
</resources>

And to finish you can also completely redefine the layout by keeping the same name layout_lazy_date_picker.xml and keep all the ids. You can find the default one here: layout_lazy_date_picker.xml

SUPPORT ❀️

Find this library useful? Support it by joining stargazers for this repository ⭐️
And follow me for my next creations πŸ‘

LICENCE

LazyDatePicker by Lopez Mikhael is licensed under a Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].