using System;
using System.Web.UI;

public partial class Calendar_SelectionChanged : Page
{
   protected void Calendar1_SelectionChanged(object sender, EventArgs e)
   {
      lblTodaysDate.Text = "Dzisiejsza data to " + Calendar1.TodaysDate.ToShortDateString();
      if (Calendar1.SelectedDate != DateTime.MinValue)
      {
         lblSelected.Text = "Zaznaczoną datą jest " + Calendar1.SelectedDate.ToShortDateString();
      }
      lblCountUpdate();
   }

   private void lblCountUpdate() 
   { 
      lblCount.Text = "Liczba zaznaczonych dni:  " + Calendar1.SelectedDates.Count.ToString(); 
   }

}
