Please help me.
How to highlighted multiple dates?
I want multiple dates highlighted in datepicker control. That are fetched from database.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Nov 25, 2013, 7:40 PM EST
You can do this using the property BlackoutDates of datepicker control.
http://msdn.microsoft.com/en-us/magazine/dd882520.aspx
http://www.codeproject.com/Articles/88757/WPF-Calendar-and-Datepicker-Final
Abhay ShankerRank #375 · 6.7K reputationPosted Nov 25, 2013, 8:07 PM EST
$(function() {
var datesArray=['11/1/2013','11/4/2013']
var datesArray1=['11/5/2013','11/8/2013']
$( "#datepicker" ).datepicker({
numberOfMonths: 3,
showButtonPanel: true,
selectMultiple:true,
beforeShowDay: function (date) {
var theday = (date.getMonth()+1) +'/'+
date.getDate()+ '/' +
date.getFullYear();
return [true,$.inArray(theday, datesArray) >=0?"specialDate":($.inArray(theday, datesArray1)>=0?"specialDate1":'')];
}
});
//$.inArray(theday, datesArray) >=0?"specialDate":'specialDate1'
});
CSS
specialDate { background-color: #6F0 !important; }
.specialDate1 { background: #e81e46; }
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Nov 25, 2013, 8:09 PM EST
The question is on WPF
Swati Deshmukh4 reputationPosted Nov 26, 2013, 7:02 PM EST