0

How can I get specific list of date clickable on AngularJs datepicker. I follow the link http://plnkr.co/edit/gGAU0L?p=preview Here weekends are disabled. I think this function can be modified for enable instead of disable.

// Disable weekend selection
  $scope.disabled = function(date, mode) {
    return ( mode === 'day' && ( date.getDay() === 0 || date.getDay() === 6 ) );
  };

Actually I'm working on a patient care project where patient must have to click dates that are available for doctor. Xperts Plz help me........thanx

4
  • Can you clarify a bit further on what you are trying to do? Your question is a little unclear! Commented Feb 11, 2015 at 9:19
  • I just need a ng calendar where doctor's available dates will be clickable by patient when getting doctor's appointment. so if I have dates in dateList of doctor's available dates how can I enable only that dates on the datepicker ui as the plnkr.co/edit/gGAU0L?p=preview :) thnx JMK Commented Feb 11, 2015 at 9:49
  • Did you get a change to figure out with this? 'cause I have same problem and can't find an aswer or example. Thanks! Commented Nov 5, 2015 at 11:44
  • ya I got solved this with my won way, I'll provide you a plunkr within consecutive hours, thankz Commented Nov 7, 2015 at 4:31

1 Answer 1

1

Yes you can use this function to make specific dates (non-)clickable. Just return true or false, based on a request or whatever your criteria is:

// Disable specific dates
$scope.disabled = function(date, mode) {
    // return true or false here
};
Sign up to request clarification or add additional context in comments.

2 Comments

I've a doctor's available date array, I want know how to access the 'date' object with the date list and enable that dates on calender UI. Thnx @DonJuwe, plz give me more specific way that I can solve my problem
Hi Sharif! please upload your plunker. it will be very helpful! the full code as an answer would be appreciated where you enable the dates you want!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.