Warning: First parameter must either be an object or the name of an existing class in H:\root\home\amrsaafan-001\www\nilebits\wp-content\themes\porto\inc\functions\general.php on line 1051

Warning: First parameter must either be an object or the name of an existing class in H:\root\home\amrsaafan-001\www\nilebits\wp-content\themes\porto\inc\functions\general.php on line 1051

Warning: First parameter must either be an object or the name of an existing class in H:\root\home\amrsaafan-001\www\nilebits\wp-content\themes\porto\inc\functions\general.php on line 1051
March 2008 | Nile Bits

Monthly Archives - March 2008

Make previous calendar dates not selectable in ASP.NET

In order to make all dates before the current date, not able to be selected, in the onDayRender event for your Calendar: if (e.Day.Date < DateTime.Today) { e.Day.IsSelectable = false; } To make it more obvious to the end user, also add: e.Cell.BackColor = Drawing.Color.GhostWhite; e.Cell.ForeColor = Drawing.Color.Gainsboro;