7
Answers

how to give Calendar1.SelectedDate ?

Vasu Gadhiya

Vasu Gadhiya

11y
1.3k
1
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)