How I can make a restriction for date selection in date picker?


How I can make a restriction for date selection such as just show date 1 & 15 only for every month when select date in datepicker for ionic app? Please check out my script below:

template html

  <ion-view  title="Template">
    <ion-nav-buttons side="secondary">
        <button class="button-icon icon ion-calendar assertive" ng-click="datePicker()">  </button>
<div class="bar bar-subheader bar-assertive">

      <ion-content class="has-header has-subheader ">  


Controller js

.controller('MyCtrl', function($scope, $rootScope, $ionicPopup, $state, $filter) {

  $scope.datePicker =function() { 
    title: 'Date Picker',
    template: 'Please Input Date',
    inputType: 'date',
     }).then(function(res) {
         if (res) {
       $scope.currentDate = res;
       var newdate = $filter('date')($scope.currentDate,'yyyy/MM/dd'); 
     $rootScope.showLoading("Loading data..");

 } else {




I hope anyone can help me to solve this problem


An answer is no, input date is not flexible as much, reference:

What you can do is use 3rd party Ionic date plugin:
it’s under chapter 3: Ionic Date Picker.

Implement it into your project and use CSS to disable all not needed dates. It will take some time but I think you can manage to do that.


Thanks for your answer but could you give an example code to disable all not needed dates and just show date 1 & 15?