Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added feature for disabling specific dates #31

Closed

Conversation

campsjos
Copy link
Contributor

@campsjos campsjos commented Jul 1, 2015

disableddates optional attribute for ionic-datepicker directive disables the days in the calendar specified in a Date objects array.

Example of use:

//controllers.js
$scope.disabledDates = [
      new Date(2015,7,10), //months are 0-based, this is August, 10th!
      new Date('Wednesday, August 12, 2015'), //Works with any valid Date formats like long format
      new Date("08-14-2015"), //Short format
      new Date(1439676000000) //UNIX format
    ];
<ionic-datepicker 
    idate="currentDate" 
    disablepreviousdates="true" 
    disableddates="disabledDates">
    <button class="button button-block button-positive"> 
        {{ currentDate | date:'dd - MMMM - yyyy' }}
    </button>
</ionic-datepicker>

rajeshwarpatlolla added a commit that referenced this pull request Jul 13, 2015
@rajeshwarpatlolla
Copy link
Owner

Thanks for you PR. I have merged one of your PR. I tried to merge this too, but getting an error.

To git@github-personal:rajeshwarpatlolla/ionic-datepicker.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github-personal:rajeshwarpatlolla/ionic-datepicker.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

@campsjos
Copy link
Contributor Author

I've got the same error when tried to merge my 2 commits in my fork master branch... I do not know really how solve it...

@rajeshwarpatlolla
Copy link
Owner

Ok, i merged your other PR, i will add your code of this PR in to my next release and then i will close this PR. Is this ok for you?

@campsjos
Copy link
Contributor Author

Yes, of course!

@rajeshwarpatlolla
Copy link
Owner

ok, Thanks for your PR :-)

@rajeshwarpatlolla
Copy link
Owner

Merged in to new version v0.5.0. Thanks again for your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants