Giter Club home page Giter Club logo

Comments (6)

rajeshwarpatlolla avatar rajeshwarpatlolla commented on May 12, 2024

For now, there is no such functionality. But i will try to implement in the future releases.

from ionic-datepicker.

lior-greenblatt avatar lior-greenblatt commented on May 12, 2024

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.

lior-greenblatt avatar lior-greenblatt commented on May 12, 2024

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.

rajeshwarpatlolla avatar rajeshwarpatlolla commented on May 12, 2024

Drop downs are added for selecting both month and year in the new version v0.3.0.

from ionic-datepicker.

lior-greenblatt avatar lior-greenblatt commented on May 12, 2024

Great!!
Thank you

from ionic-datepicker.

arumuganainar avatar arumuganainar commented on May 12, 2024

Error: [$compile:nonassign] Expression 'undefined' in attribute 'idate' used with directive 'ionicDatepicker' is non-assignable!

from ionic-datepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.