Disable Specific Days

Posted by Murugavelmsc under ASP.NET on 2/28/2013 | Points: 10 | Views : 1728 | Status : [Member] | Replies : 7
Hi Expert,

How to Disable Specific Days without using Jquery

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Raj.Trivedi on: 2/28/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Murugavelmsc

Please check this link

http://joshrharrison.com/archive/2008/04/12/disable-days-on-asp.net-calendar-control.aspx

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 2/28/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

Murugavel

where do u need disable those days in asp.net Calender control?

can you elobarate them.

Mark as Answer if its helpful to you

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Murugavelmsc on: 2/28/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Jayakumar,

For eg, we take employee who applied a leave. In this we disable the sundays , saturdays and nonworking days.

I hope u are clear now.

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 3/5/2013 [Member] Starter | Points: 25

Up
0
Down
Hi

To disable specific days in asp.net calendar control.
For that your aspx page should be like this.
You can do this in DAYRENDER Event in asp.net.
 <asp:Calendar ID="Calendar1" runat="server" OnDayRender="Calendar1_DayRender"></asp:Calendar>
Your cs page should be like this:
In that event you should write the code like this
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)

{
if (e.Day.Date.DayOfWeek == DayOfWeek.Saturday || e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
{
e.Day.IsSelectable = false;
e.Cell.ForeColor = System.Drawing.Color.Blue;
}
}


You have to do like this.


Thanks & Regards,
Santhi .V

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Murugavelmsc on: 3/15/2013 [Member] Starter | Points: 25

Up
0
Down
Hi santhi,

Thanks for your response.
How can handle non working days.

I have non working days in database

Please help me.

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/15/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
murugavel non working days means u have store that day of weekdays like this ex: 03 or Wednesday ?

Mark as Answer if its helpful to you

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Murugavelmsc on: 3/15/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

in the nonworking day table have

date reason
1-1-2013 new year
15-1-2013 pongal
26-1-2013 republic day

25-12-2013 christmas

like this

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response