Vasu Gadhiya

Vasu Gadhiya

  • NA
  • 429
  • 100.8k

how to give Calendar1.SelectedDate ?

Sep 5 2013 4:29 AM
I have use Calendar Control,

-------------------------------------------
void Calendar1_Load()
{
Calendar1.SelectedDate = DateTime.Today;
}
-------------------------------------------

it complete working but server return US Time. So i convert into india time

-------------------------------------------
void Calendar1_Load()
{
TimeZoneInfo INDIAN_ZONE = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
         DateTime indianTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);
Calendar1.SelectedDate =  ?
}
-------------------------------------------

but i don't Know how to set indiantime as selected date.

Thanks in advance.

Answers (7)