Guest User

justin

a guest
May 14th, 2008
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. using System;
  2.  
  3. namespace MAA.Web.UI.WebControls
  4. {
  5. public class MAACalendar : System.Web.UI.WebControls.Calendar
  6. {
  7. public DateTime? SelectedValue
  8. {
  9. get
  10. {
  11. if (this.SelectedValue == null)
  12. base.SelectedDate = DateTime.MinValue;
  13. else
  14. base.SelectedDate = (DateTime)this.SelectedValue;
  15.  
  16. return this.SelectedValue;
  17. }
  18. set
  19. {
  20. if (value == null)
  21. base.SelectedDate = DateTime.MinValue;
  22. else
  23. base.SelectedDate = (DateTime)value;
  24. this.SelectedValue = value;
  25. }
  26. }
  27. }
  28. }
  29.  
  30.  
  31. //to use, drop the library into your bin folder
  32. //then register the tag like this on your aspx page
  33. //<%@ Register
  34. Assembly="MAA.Web"
  35. Namespace="MAA.Web.UI.WebControls"
  36. TagPrefix="MAA:Calendar" %>
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment