calendar-control

DropDownList containing weeks

我怕爱的太早我们不能终老 提交于 2021-02-11 17:29:47
问题 I'm working on an intranet site, specifically on a Weekly Monitoring tool for employees. What I need is to fill a DropDownList with weeks, example week: Week : From 12/10/15 to 18/10/15 I'm able to filter on another page but with years and month: CalendarController c = new CalendarController(); ViewBag.ListYears = c.ListYears(iyear); ViewBag.ListMonths = c.ListMonths(imonth); ViewBag.ListDaysOfMonth = _service.ListDaysOfMonth(iyear.ToString(), imonth.ToString()); And use forms to save them.

calendar column c# in datagridview

本秂侑毒 提交于 2019-12-11 13:06:15
问题 Basically I want to show a calendar when I edit some columns in my Datagridview. Following How to: Host Controls in Windows Forms DataGridView Cells from MSDN I can add wanted kind of column at building. But in my case, I have to use a datasource provided by an Excel reader which give headings have to be connected to date type columns. private DataGridView AddCalendars(DataGridView dtgv) { dtgv.DataSource = controller.getEmptyDataTable(); // DataTable provided by excel reader var l = dtgv

asp.net calendar control. Date selectable after 2 days from the current

十年热恋 提交于 2019-12-11 05:32:35
问题 Is it possible to restrict which dates are selectable in the calendar control eg so that a date can only be selected once it's at least two days ago? 回答1: You can handle the calendar control's DayRender event to control which days are visible/selectable (as seen in this forum discussion): protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { if (e.Day.Date >= DateTime.Now.Date && e.Day.Date <= DateTime.Now.AddDays(2)) e.Cell.Visible = true; else e.Cell.Visible = false; }