drawers / spinnerdatepicker Goto Github PK
View Code? Open in Web Editor NEWA styleable DatePicker for Android using the old spinner style (NumberPickers)
A styleable DatePicker for Android using the old spinner style (NumberPickers)
If current date is provided as max date. It results in below UX behavior under below steps results in an additional date getting as shown below.
Steps to reproduce:
Hello sir,
I have to implement your library but some device date and time, not displayed.
Please see this image : https://imgur.com/ztzG7K4
Thanks
Jaydeep Dhamecha
I was trying to add old style date picker. but i have to migrate to android X.
can you please tell me is there any way to use this library without migrating to android X?
In the homepage example please replace
.showDay(true)
to
.showDaySpinner(true)
The title on the date picker dialog is simply the date that is being picked. It would be good if the dialog title could optionally match the label that is associated date picker. For example, if the label associated with the date picker is "Date of Birth" then the title of the dialog would also be "Date of Birth".
If i set datePickerDialog.setTitle("Something") and change date - title is lost. You can add boolean parameter in the builder for this?(onDateChanged, updateTitle method)
Is there any way to change the language? on the buttons and the title
Feature Request : Keep default value as dd mm yyyy text instead of some value ; thus forcing user to select date
I use a license list generator library to create the list of dependencies I have in my app, with their licenses. There are a couple, including yours, which do not show a connection to their license.
I have opened an issue on their side (jk1/Gradle-License-Report#154), to hopefully allow for manual entry of the info in case it just can't be picked up from a dependency pom, but it'd be helpful for many users if you could make it available at your end.
I don't see a POM in your project, but since the help includes linking to it via maven repository, I'm opening this request in the hopes that with a small change, license attribution can happen automatically in this (and probably other) licenses report.
Hi!
Great picker, thank you!
I was wondering if it is possible to disable the functionality of it changing the month if I scroll past the min and max dayOfMonth?
Say if I set the timer to 1.st of april, and then scroll the dayOfMonth backwards to 31, it would cause a change in the month scroller.
Is it possible to disable this functionality?
Best regards
is there an option to remove year selection?
Hi. This is a great library. It would be great if there could be a way to disable the day selection so that I have the option of only having a month / year selection. Or at least a way to get the DatePicker so that I can hide the view myself if I do not want it
Says :
January 0;
December 11;
I followed the same exact example as shown on the main page. The colors change on Android 6.0+, but when I check on a device with Android 5.0 the only things that changed was the text color for the month, day, and year.
is it possible I might be missing something else?
Below is an example of my XML and code:
<style name="JourneyDatePickerTheme">
<item name="android:textSize">22dp</item>
<item name="android:textColorPrimary">@color/charcoal</item>
<item name="android:colorControlNormal" tools:targetApi="lollipop">@color/purplish_pink</item>
</style>
datePickerDialog .context(it) .spinnerTheme(R.style.JourneyDatePickerTheme) .defaultDate(year, month, day) .build() .show()
What I am getting on API 21:
How it's supposed to look:
Changing date format from mm-dd-yyyy to dd-mm-yyyy for display in dialog box not support,
On selecting a date, the month value returned is constantly zero (0).
When you start the picker, sometimes day text color is white until you tap the field.
My configuration:
SpinnerDatePickerDialogBuilder()
.context(context)
.callback(this)
.showTitle(true)
.spinnerTheme(R.style.NumberPickerStyle)
.showDaySpinner(true)
.defaultDate(minDate.year, minDate.monthValue, minDate.dayOfMonth)
.maxDate(minDate.year, minDate.monthValue, minDate.dayOfMonth)
.build()
<style name="NumberPickerStyle">
<item name="android:textSize">18sp</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:colorControlNormal" tools:targetApi="lollipop">@color/colorAccent</item>
</style>
Localization on the default date pickers works flawlessly by picking the app's language, however. this one is using the device's language localization.
Any Idea how to fix this?
I'm trying out this lib, and it seems to work well, except while I'm adjusting the date, it doesn't update the title (showing the date that's being picked).
I've checked, and this title is updated on the stock Kitkat date picker, as well as on the birth date picker of the Android contacts app.
Ideas?
How to set current date
Fantastic library, but if possible could you look into the possibility of adding a "maximum date" field to the builder.
What I mean by this is, after specifying a maximum date, the picker should not be able to pick a date greater than the given maximum. By default, this could be the current day or extended to any given date.
Sadly I cannot make a PR at present, so I hope this is something you can see value in and implement in future.
I saw on your summary with The old "spinner" style DatePicker for newer devices., it alert dialog with format day - month - year, but when I used, it display in format month-day-year. in this case, problem with device or what ?.or I missed spinnerTheme property. your doc should be clear about this.
thank .
Adding compile 'com.github.drawers:SpinnerDatePicker:1.0.6' to project gradle build file returns
Failed to resolve: com.github.drawers:SpinnerDatePicker:1.0.6
Something is wrong ,the link maybe ?
Thank you for uploading a good library first.
I was looking for a date picker in the form of a spinner.
However, because the format of the year, month, and day is different depending on the locale, I am looking for a way to change it.
Looking at the internal code, it seems to be only a way to recompile because the option does not exist at present. Do you plan to support it in the future?
Iโd like to propose that android:supportsRtl
is removed from AndroidManifest.xml of this project.
The reason is, when we use it to an app that the AndroidManifest defines android:supportsRtl=false
attribute, we have to add tools:replace
attribute.
This Library can't support ar language!!!
Hi, I'm using the lib in my project and miss the possibility to change the dialog title to a custom value like birthdate
.
I created a pull request ( #53 ) adding this functionality and would be happy if it is added to the lib.
Let me know if something is missing.
Cheers!
Hi,
I have an error when I try to call the SpinnerDatePicker on a fragment. I try to cast the fragment to the callback type but it crashes at runtime.
The fragment is already implementing the callback DatePickerDialog.OnDateSetListener
Here's a piece os code of my configuration:
new SpinnerDatePickerDialogBuilder()
.context(this.getContext())
.callback((com.tsongkha.spinnerdatepicker.DatePickerDialog.OnDateSetListener) this)
.spinnerTheme(R.style.NumberPickerStyle)
.showTitle(true)
.showDaySpinner(false)
.build()
.show();
Is there any solution?
Thx!
Hi I am not able to get cancel callback while using spinner date picker.
Below is my code for initializing.
new SpinnerDatePickerDialogBuilder()
.context(JoinNowActivity.this)
.callback(JoinNowActivity.this)
.spinnerTheme(R.style.NumberPickerStyle)
.showTitle(true)
.showDaySpinner(true)
.defaultDate(currentYear, currentMonth, currentDay)
.maxDate(currentYear, currentMonth, currentDay)
.minDate(1900, 0, 1)
.build()
.show();
i am able to set date but not able to get the cancel action/callback from the function.
Keyboard is not dismissed if editing a month name, and with the keyboard open you swipe to other month. After swiping to the other month the keyboard is still visible but the cursor is gone, and the IME key button is set to "enter" and if you press it, nothing happens.
You only have the option to dismiss the keyboard by pressing back (close keyboard) button
Can you please dismiss the keyboard in the event of loosing focus from the current month that is being edited? Thank you!
can I chage the defaultDate (year, month, day) to (day, month, year) ?
Is there a possibility to hide the months and day just by setting a property
hideMonths(true) it will hide day and months
hideDays(true) it will hide days
I'm trying to include the lib to my project, but I got this error:
Error:Module 'com.github.drawers:SpinnerDatePicker:0.0.4' depends on one or more Android Libraries but is a jar
and this is my gradle file :
`repositories {
maven { url "https://clojars.org/repo/" }
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.github.afollestad.material-dialogs:core:0.8.5.8@aar') {
transitive = true
}
//----- Dagger
//Required by Dagger2
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
compile files('libs/RegoPrinLib.jar')
compile files('libs/PrinterLib.jar')
compile files('libs/PRT_SDK.jar')
compile 'com.google.android.gms:play-services:11.0.2'
compile 'com.google.dagger:dagger:2.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v13:24.2.0'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android:flexbox:0.2.5'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.github.douglasjunior.BetterSpinner:library-material:bugfix-1.1.0-2'
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
compile 'com.prolificinteractive:material-calendarview:1.3.0'
compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.google.zxing:core:3.2.1'
compile 'com.squareup.retrofit2:retrofit:2.0.1'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'
compile 'com.github.douglasjunior:android-simple-tooltip:0.2.0'
compile 'com.android.support:multidex:1.0.1'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.roughike:bottom-bar:2.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.drawers:SpinnerDatePicker:0.0.4'
testCompile 'junit:junit:4.12'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
apt 'com.google.dagger:dagger-compiler:2.0.2'
provided 'javax.annotation:jsr250-api:1.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
provided 'org.glassfish:javax.annotation:10.0-b28'
}`
Hi!
I noticed there is a lot of unused code in the repo, is there a purpose for it?
I think removing it would increase the maintainability of the project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.