heysupratim / material-daterange-picker Goto Github PK
View Code? Open in Web Editor NEWA material Date Range Picker based on wdullaers MaterialDateTimePicker
License: Apache License 2.0
A material Date Range Picker based on wdullaers MaterialDateTimePicker
License: Apache License 2.0
Hey,
I'm getting this error on android 4.4.2 devices
java.lang.RuntimeException: Unable to start activity ComponentInfo{package/package.MainActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class Button
.
It works fine on other devices
how to disable future dates,i.e tomorrow on words....
As in the title, it would be nice to be able to select the default values for start/end time/date when creating a dialog. Simple setter for the end values would already be enough
This listener will be very useful
When setting a custom color for the dialog theme, the bottom is correctly themed, but the top layout isn't.
I need to change the "FROM" and "TO" strings on top of DatePicker, such that I am using multilanguage app. Which string I have to define in strings.xml file in order to change this headers.
Maybe you would make and "end time" in newInstance TimePickerDialog?
Hi,
How can I change the language of the texts to pt-br, for example?
I am interested in using your library but also by the original, is it possible to use both ?
I have this when I add the second library :
java.lang.ClassCastException: com.wdullaer.materialdatetimepicker.date.AccessibleDateAnimator cannot be cast to com.borax12.materialdaterangepicker.date.AccessibleDateAnimator
In my gradle :
compile 'com.wdullaer:materialdatetimepicker:2.1.1'
compile 'com.borax12.materialdaterangepicker:library:1.5'
Is it possible not to use the from-to in MaterialDateRangePicker ?
Best regards,
Fatal Exception: java.lang.ClassCastException: com.wdullaer.materialdatetimepicker.date.AccessibleDateAnimator cannot be cast to com.borax12.materialdaterangepicker.date.AccessibleDateAnimator
at com.borax12.materialdaterangepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:371)
at android.app.Fragment.performCreateView(Fragment.java:2114)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:904)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
at android.app.BackStackRecord.run(BackStackRecord.java:834)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1469)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:452)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
i implemented the sample code, but got the following error:
java.lang.NoSuchFieldError: com.borax12.materialdaterangepicker.R$id.tabHost at com.borax12.materialdaterangepicker.time.TimePickerDialog.onCreateView(TimePickerDialog.java:281)
I am facing issue in showing multiple months in the date picker. Why i want to show this is so that the user knows how to move across the months
Hey, I was looking how to change style but as you can see the other Repo does not include guide in how to change TabWidget background analizing your code I found that you can use "@color/mdtp_circle_background"
You can specify this on you readme and save people time :)
1.8 does not work.
compile 'com.borax12.materialdaterangepicker:library:1.8'
What is the right version to use?
Hi, for the date range picker I noticed the scrolling behavior is faulty when you change tabs if you are not already at the position of the selected day. It will scroll to the month before the day you selected.
Can you add a function to allow custom theme color? I saw the DatePickerDialog
retrieves the accent color from the theme in it's onCreateView
. It would already be good enough to add a protected function getAccentColor()
and implement your default code in this function so that I can at least overwrite it with a custom function...
Hi @borax12, how are you?
First of all, thanks for your amazing work with this library.
Can i change the labels from the TimePickerDialog?
At.t
If I want to use this library (for data ranges), and original library https://github.com/wdullaer/MaterialDateTimePicker (for one date picker) - then my gradle didn't sync, because of some ids conflicts:
/myApp/app/build/intermediates/exploded-aar/com.wdullaer/materialdatetimepicker/3.0.0/res/layout-land/mdtp_time_header_label.xml
Error:(72, 31) No resource found that matches the given name (at 'layout_above' with value '@id/seconds_space').
Warning:string 'mdtp_sans_serif' has no default translation.
/myApp/app/build/intermediates/res/merged/debug/layout-land/mdtp_time_header_label.xml
Error:(72, 31) No resource found that matches the given name (at 'layout_above' with value '@id/seconds_space').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Is there a possiblity to set different default dates to end and start date. I want date picker to open with different start and end dates.
DatePickerDialog
defines "FROM" and "TO" strings in the code. Should be done via a string resource so that it's possible to localise those strings...
See this image.
On the "From" tab, I have additional characters that shouldn't be there.
The "To" tab is fine.
Hi I want to disable in TO tab, all the dates before the date selected in FROM tab. Let me know how can I achieve this feature
When the user selects a date from the "FROM" tab, that date should be the maximum date so when the user clicks on the "TO" tab the date will be greater than or equal to the date in the "FROM" tab.
ex) if the user selects 10/11/16 in the "FROM" tab, the user should not be able to select a date earlier than that in the "TO" tab
Hello,
is possible to disable days on To view which are older than From selected day by dialog settings?
I can calculate it manually and show Toast, but I didn't found any solution, how to cancel dismissing dialog after OK clicked.
I check setOnDismissListener which dismiss dialog, but I'm not able to stop dialog dismissing.
It is possible to initialize DateRangePicker with a custom end date? It would be nice if we could set arbitrary start and end date.
It is necessary to track if user pressed both from and to tabs (and set time or date) because sometime user only set time (FROM) and forget to set (TO)
@Override
public void onDayOfMonthSelected(int year, int month, int day) {
if(tabHost.getCurrentTab()==0){
mCalendar.set(Calendar.YEAR, year);
mCalendar.set(Calendar.MONTH, month);
mCalendar.set(Calendar.DAY_OF_MONTH, day);
}
else{
mCalendarEnd.set(Calendar.YEAR, year);
mCalendarEnd.set(Calendar.MONTH, month);
mCalendarEnd.set(Calendar.DAY_OF_MONTH, day);
}
//updatePickers(); <======= why is it commented?
updateDisplay(true);
}
Because of this comment onDateChanged callback is not called when I choose a date. Was it commented for some reason?
Hello I found new bug when I select start date month and then want to select end date month which is different from selected start date month , it selects but it returns you in same month which was selected on start date.
Hello,
I saw different posts exposing this issue but any of those solved my case.
I specify full namespace of the DatePickerDialog
Calendar now = Calendar.getInstance(); com.borax12.materialdaterangepicker.date.DatePickerDialog.newInstance( null, now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH) ).show( getActivity().getFragmentManager(), "Datepickerdialog" );
but it gives me a class cast exception,
java.lang.ClassCastException: com.wdullaer.materialdatetimepicker.date.AccessibleDateAnimator cannot be cast to com.borax12.materialdaterangepicker.date.AccessibleDateAnimator
The build.gradle file includes both libraries as follow
compile 'com.wdullaer:materialdatetimepicker:2.5.0' compile 'com.borax12.materialdaterangepicker:library:1.9'
Any suggestion to how solve this case?
Thanks in advance @borax12 !
Hello,
i am developing an app with range calendar its awesome and helpful.
i have a problem,
i want that if user select a date from first calendar ("FROM calendar" )
then in second calendar ("To calendar") that date show selected so that user can select relative date from first calendar
please add a listener or method for that
please help
Thanks in advance
cool, this is great.
i love ur lib. its awesome
can u add persian calendar too??
TnQ
Want to intialise the date picker with the "end" tab.
With TabHost it is a simple method:
tabHost.setCurrentTab(n);
Is there a way to do this?
Gradle Error:Could not find com.borax12.materialdaterangepicker:library:1.8.
http://gradleplease.appspot.com/#borax12
https://bintray.com/search?query=borax12
Anyone knows how to include this library?
How can we change tabs green indicator color to something else?
In date picker words "From" and "To" are not localized. See image https://yadi.sk/i/bzup65yJpyRrZ
Is there a way for us to know if user tap From/To?
Also, can we automatically jump to To when user has selected a date on From?
I would also like to highlight the selected range of dates, how is that possible?
It also looks like we can't detect date change?
Date picker on To card jump back on current month after select some day in onother month/year than is current.
The behavior on FROM and TO cards is different.
Tested on Android 5.0
When I selected some items, I didn't deselect it.
hello,i have tried this code
Calendar now = Calendar.getInstance(); DatePickerDialog dpd = DatePickerDialog.newInstance( MainActivity.this, now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH) ); dpd.show(getFragmentManager(), "Datepickerdialog");
in my fragment,since we need to change the context where in the above code passes MainActivity.this,i also tried with this code.
Calendar now = Calendar.getInstance(); DatePickerDialog dpd = new DatePickerDialog(); dpd.show(getFragmentManager(), "Datepickerdialog");
this code displays the dailog but its interface doesnt get called when picking a date range
i have also tried passing getActivty() and getContecxt() but none works,please help
initializing a new instance can only set date from and to with the same date,
can there be a way to set both date from and to independently.
Is there a way to detect when just the start time is updated, or when the tabs change? Basically I'm looking to automatically set the To time to be an hour ahead of the From time when they change the From value and switch tabs.
Am using the v4 support version of the android Fragment and am unable to instate the date picker with version 1.7 of the library. All attempts to set the listener and the fragmentManager fail. The parameters are not being accepted. The listener is implemented on the Fragment and the fragment is hosted in an activity that extends AppCompatActivity.
Add gradle/maven support for faster include in projects
Hi!
We can't change tabs green indicator color to something else (time picker).
Meanwhile we can change tabs indicator color to something else (date picker).
Thanks.
Hey, is it possible to backport your library for older APIs please? API 10 would be awesome. Thanks
Is there a way to only enable one option dialog, no two (From & To). I know the whole point of this library is that it is a range picker, but it's probably worth asking.
I need a range picker for date, but only single picker for time. My options are to use android picker for time, but I want it to look the same for older versions of Android.
If i select a future date in the From tab and i clicked on To tab. It is still showing current date as selected. The To tab value should be same or latter than The value selected in from tab.
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.