Skip to content
一个Android高效日期选择控件,支持(年月日时分星期)等多种模式的控件
Java
Branch: master
Clone or download
Latest commit 755f035 Aug 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea v1.0.0 Dec 15, 2016
app 修复选择不同月份,选择天数时闪退的bug Dec 29, 2016
gradle/wrapper Initial commit Dec 15, 2016
image v1.0.0 Dec 15, 2016
mylibrary 修复选择不同月份,选择天数时闪退的bug Dec 29, 2016
.gitignore Initial commit Dec 15, 2016
README.md v1.0.0 Jan 7, 2017
app-debug.apk v1.0.0 Jan 7, 2017
build.gradle v1.0.0 Dec 15, 2016
gradle-app.setting Initial commit Dec 15, 2016
gradle.properties Initial commit Dec 15, 2016
gradlew Initial commit Dec 15, 2016
gradlew.bat Initial commit Dec 15, 2016
settings.gradle Initial commit Dec 15, 2016
test.sh Update test.sh Aug 7, 2018

README.md

PickTime

日期选择控件

apk下载

截图


TYPE_ALL TYPE_YMDHM TYPE_YMDH TYPE_YMD TYPE_HM
Alt text Alt text Alt text Alt text Alt text

效果


Alt text

DateType

  • TYPE_ALL--年、月、日、星期、时、分
  • TYPE_YMDHM--年、月、日、时、分
  • TYPE_YMDH--年、月、日、时
  • TYPE_YMD--年、月、日
  • TYPE_HM--时、分

how to use

  • Add it in your root build.gradle at the end of repositories:
	    allprojects {
		   repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	    }
  • Add the dependency
	dependencies {
	        compile 'com.github.codbking:PickTime:v1.0.1'
	}
  • java
        DatePickDialog dialog = new DatePickDialog(this);
        //设置上下年分限制
        dialog.setYearLimt(5);
        //设置标题
        dialog.setTitle("选择时间");
        //设置类型
        dialog.setType(DateType.TYPE_ALL);
        //设置消息体的显示格式,日期格式
        dialog.setMessageFormat("yyyy-MM-dd HH:mm");
        //设置选择回调
        dialog.setOnChangeLisener(null);
        //设置点击确定按钮回调
        dialog.setOnSureLisener(null);
        dialog.show();
You can’t perform that action at this time.