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!
    – JMK
    CommentedFeb 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
    – X-Coder
    CommentedFeb 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!
    – you-rick
    CommentedNov 5, 2015 at 11:44
  • ya I got solved this with my won way, I'll provide you a plunkr within consecutive hours, thankz
    – X-Coder
    CommentedNov 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 }; 
2
  • 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
    – X-Coder
    CommentedMay 25, 2015 at 6:22
  • 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!CommentedMar 28, 2016 at 8:36

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.