booked dates should appear in red color in calender
-
i am disabling past dates and remaining dates in green color with the following code
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{if (e.Day.Date < DateTime.Today)
{e.Day.IsSelectable = false;e.Cell.ForeColor = System.Drawing.Color.Gray; } else { e.Cell.ForeColor = System.Drawing.Color.Green; } }
i have two dropdownlists ddlFrom and ddlTo.i vil select dates from these dropdownlists to book a room in a hotel.the dates fromdate to todate should appear in red color...any help is appreciated
-
i am disabling past dates and remaining dates in green color with the following code
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{if (e.Day.Date < DateTime.Today)
{e.Day.IsSelectable = false;e.Cell.ForeColor = System.Drawing.Color.Gray; } else { e.Cell.ForeColor = System.Drawing.Color.Green; } }
i have two dropdownlists ddlFrom and ddlTo.i vil select dates from these dropdownlists to book a room in a hotel.the dates fromdate to todate should appear in red color...any help is appreciated
Member 8701813 wrote:
.any help is appreciated
Can you be specific on what kind of help you seek? You shared the colors of dates in a calendar, next you talk of having start-end date in red color, what does it mean? What exactly are you trying to do? Where are you stuck specifically when you tried?
Sandeep Mewara Microsoft ASP.NET MVP 2012 & 2013 [My Blog]: Sandeep Mewara's Tech Journal! [My Latest Article]: HTML5 Quick Start Web Application
-
Member 8701813 wrote:
.any help is appreciated
Can you be specific on what kind of help you seek? You shared the colors of dates in a calendar, next you talk of having start-end date in red color, what does it mean? What exactly are you trying to do? Where are you stuck specifically when you tried?
Sandeep Mewara Microsoft ASP.NET MVP 2012 & 2013 [My Blog]: Sandeep Mewara's Tech Journal! [My Latest Article]: HTML5 Quick Start Web Application
i mean , i vil select dates from dropdown lists namely ddlfrom and ddlto dropdownlists to book a room in hotel.in a calender these dates which are selected from the above mentioned dropdownlists should appear in red color...which indicates those dates are booked....available dates are in green color...only dates which are in green color the user can book....red colored dates he cannot book...i tried this in selection_changed event ...but i couldn't meet this requirement...
-
Member 8701813 wrote:
.any help is appreciated
Can you be specific on what kind of help you seek? You shared the colors of dates in a calendar, next you talk of having start-end date in red color, what does it mean? What exactly are you trying to do? Where are you stuck specifically when you tried?
Sandeep Mewara Microsoft ASP.NET MVP 2012 & 2013 [My Blog]: Sandeep Mewara's Tech Journal! [My Latest Article]: HTML5 Quick Start Web Application
hi,my requirement is changed now...i have to use 2 textboxes namely txtFrom and txtTo.i vil enter dates in these 2 textboxes..the dates mentioned from txtFrom to txtTo shuld appear in red color.i am converting string to date by the following code DateTime FromDate = DateTime.ParseExact(txtFrom.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture); DateTime ToDate = DateTime.ParseExact(txtTo.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture); but how to implement in calender...pls give me any suggestion...