Comments (7)
You're right, there's a bug with the years. The setter is used by style attributes in
<com.kunzisoft.switchdatetime.date.widget.ListPickerYearView
xmlns:year="http://schemas.android.com/apk/res-auto"
android:id="@+id/yearPicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
year:minYear="1900"
year:maxYear="3000"
year:defaultYear="2016"
/>
And setter can't be changed because of
setMinYear(yearTypedArray.getInt(R.styleable.ListPickerYearView_minYear, minYear));
setMaxYear(yearTypedArray.getInt(R.styleable.ListPickerYearView_maxYear, minYear));
I will change the code so that the setters have priority over the XML. I will also change the listView by a recycleView because I have found delays.
I will try to upload the new version in the day.
from android-switchdatetimepicker.
You can do this now with 1.4 version, but you can't precise a time for restriction.
And you can now set a default DateTime with
dateTimeFragment.setDefaultDateTime(new GregorianCalendar(2017, Calendar.MARCH, 4, 15, 20).getTime());
from android-switchdatetimepicker.
Hi !
You can add code in the project, the problem will be to manage the time lock on the different views and to synchronize them.You must add gray parts to the views, prevent the cursor from each view from going over those gray areas. And manage the listeners so that the time is compatible with the day of the month of the year, that the day is compatible with the month of the year, etc ...
It's a lot of work and if you want to contribute it will be very appreciated. :) For the moment, I add features of the other posts.
from android-switchdatetimepicker.
materialCalendarView.state().edit().setMinimumDate(CalendarDay.from(2016, 12, 31)).commit();
above line helps to disable past dates.
https://github.com/prolificinteractive/material-calendarview
i tried following line to limit year.But its not working programmatically.
listPickerYearView.setMinYear(2017);
from android-switchdatetimepicker.
OK, It's working in my PC but I must change few bugs before commit. You will be able to set a minimum and maximum dates but I have not yet manage hours and minutes.
from android-switchdatetimepicker.
Thank you @J-Jamet
from android-switchdatetimepicker.
Link #33
from android-switchdatetimepicker.
Related Issues (20)
- It opens slowly HOT 2
- i can't set minimum date HOT 1
- i can not be set minimum time HOT 2
- set default date on click as todays date currently showing december 2017 HOT 5
- How to disable the time selection. HOT 2
- Not close picker in invalid case HOT 2
- warn: ignoring element 'g' with unknown namespace HOT 3
- Migrate to androidX HOT 1
- How To Get Current Selected Date and Time as String? HOT 1
- How to change colour of Weekdays and background of button Bar at the bottom? HOT 1
- Option to use digital clock for Time chooser
- App crashes on selecting year HOT 1
- How to show picker when click from dailog HOT 1
- Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. HOT 1
- How to use this widget for multiple edit texts ? HOT 1
- Margin between header and calendar is too high. HOT 2
- Margin between header and calendar is too high. HOT 1
- Couldn't find the repo HOT 1
- Set week start day
- A HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-switchdatetimepicker.