calendar validation .net

using System;
using System.Web.UI;
using System.ComponentModel;

namespace ExtendCalendar
{

[ValidationProperty(“Text”)]
public class VCalendar : System.Web.UI.WebControls.Calendar
{
public string Text
{
get
{
string dateString = this.SelectedDate.ToString(“yyyy/MM/dd”);
if (dateString == “0001/01/01”)
return “”;
return dateString;
}
}

}
}

Advertisements

One thought on “calendar validation .net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s