Coder Social home page Coder Social logo

emmanuelmess / datetimepicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lachlanmckee/datetimepicker

0.0 3.0 0.0 2.99 MB

DateTimePicker is a library which contains the beautiful DatePicker that can be seen in the new Google Agenda app.

Java 100.00%

datetimepicker's Introduction

Official source:

https://android.googlesource.com/platform/frameworks/opt/datetimepicker/ (Android 4.3+)

#DateTimePicker

DateTimePicker is a library which contains the beautiful DatePicker and TimePicker that can be seen in the new Google Agenda app.

This picker is available for 2.3+ (API >= 9)

You have a recurrence picker in the same style here.

WARNING

  • Requires android-appcompat-v7
  • Accessibility is missing for DatePicker on all devices and Below ICS devices for TimePicker.

Description

This library reproduces as much as possible the original picker contained in the new Google Agenda app.

Example Image

Or browse the source code of the sample application for a complete example of use.

Including in your project

Last version is v0.1

Just add the following in your build.gradle

repositories{
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.emmanuelmess:datetimepicker:v0.1'
}

Usage

  1. Basic

Date Picker

DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(new OnDateSetListener() {...}, year, month, day);

Time Picker

TimePickerDialog timePickerDialog = TimePickerDialog.newInstance(new TimePickerDialog.OnTimeSetListener() {...}, hourOfDay, minute, is24HourMode);

For more info look at the source code of the provided sample here

  1. Change Dialog Primary Color

Colors will be based off AppCompat colorPrimary and colorPrimaryDark. You must use a theme based on Theme.AppCompat.

  1. Set Min/Max Date
datePickerDialog.setDateConstaints(new SimpleMonthAdapter.CalendarDay(2015, 4, 17), new SimpleMonthAdapter.CalendarDay(2015, 4, 20));

Acknowledgements

  • Thanks to Google for this beautiful picker

License

Copyright 2013 Flavien Laurent (DatePicker) edisonw (TimePicker)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

datetimepicker's People

Contributors

andacaydin avatar ciotto avatar edisonw avatar emmanuelmess avatar flavienlaurent avatar jaydp17 avatar lachlanmckee avatar miguelcatalan avatar nosyjoe avatar raymondlam avatar simplicityapks avatar ugonna avatar writtmeyer avatar xuniu avatar

Watchers

 avatar  avatar  avatar

datetimepicker's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.