Comments (6)
For now, there is no such functionality. But i will try to implement in the future releases.
from ionic-datepicker.
Thanks for the prompt reply.
I took the liberty of playing around with it and added a selection with the following changes.
in the template:
<div class="col col-80 text-center">{{currentMonth}} - <select ng-model="currentYear" ng-options="y as y for y in years" ng-change="changedYear(currentYear)"></select></div>
in the directive:
added to scope:
yearsLow: '@'
yearsHigh: '@'
added to link:
var i;
i = scope.yearsLow;
while (i >= 0) {
scope.years.push(scope.today.year - i);
i--;
}
i = 1;
while (i <= scope.yearsHigh) {
scope.years.push(scope.today.year + i);
i++;
}
scope.changedYear = function(newYear) {
currentDate.setYear(newYear);
scope.currentYear = currentDate.getFullYear();
return refreshDateList(currentDate);
};
And finally used:
<ionic-datepicker idate="date" disablepreviousdates="false" years-low="50" years-high="10">
<button class="button button-block button-positive"> {{ date | date:'dd - MMMM - yyyy' }} </button>
</ionic-datepicker>
Hope it helps :)
from ionic-datepicker.
One small thing I also noticed was the height of the calendar.
since some months show 6 weeks 180px wasn't enough (in case set was clicked before selecting a date) and the error message was under the last days of the month so I used 210px
from ionic-datepicker.
Drop downs are added for selecting both month and year in the new version v0.3.0
.
from ionic-datepicker.
Great!!
Thank you
from ionic-datepicker.
Error: [$compile:nonassign] Expression 'undefined' in attribute 'idate' used with directive 'ionicDatepicker' is non-assignable!
from ionic-datepicker.
Related Issues (20)
- disabledDates problem HOT 1
- How to call date picker in index.html HOT 3
- Could not Set Date Format HOT 2
- How to Store DatePicker Date in Firebase HOT 2
- Unwanted behavior with Today button HOT 1
- Weird behavior on change month HOT 2
- Ionic datepicker range HOT 1
- Issue on updating object input-obj HOT 1
- No option to change the order of buttons. HOT 1
- [QUESTION] Select disabled days HOT 1
- Show only last six month date in date picker HOT 1
- Show last selected date in date picker HOT 3
- Similar code for Ionic 2? HOT 2
- Exception - didnt manage to figure it out HOT 1
- Previous and next button navigation issue HOT 2
- Multilanguage support
- function to update inputDate
- $scope.today is initialized on create and cannot be reset HOT 1
- SVG icons HOT 1
- How Can I Use Persian Caleneder In Ionic and Angular Datetime? 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 ionic-datepicker.