当MonthCalender位于Year View中时,单击MonthCalender上的Todays链接无法正常工作 [英] Clicking on Todays link on a MonthCalender is not working as expected when the MonthCalender is in Year View
问题描述
即使点击今天的链接重点是2018年而不是当天,即23/01/2018
      private void monthCalendar1_MouseUp(object sender,MouseEventArgs e)
      {
          var hit = this.monthCalendar1.HitTest(e.Location);
          if(hit.HitArea == MonthCalendar.HitArea.TodayLink)
          {
            monthCalendar1.SetDate(DateTime.Today)
        }
  }
Hi Anil,
我在表单上添加了monthCalendar1控件,如果我选择另一个日期,例如2015-01-02,可以通过点击monthCalendar1底部的今天链接到今天的日期。如果您只选择年份视图,但今天点击
链接无法转到今天。
通过我的搜索,在年视图中,我找不到其他今天点击今天链接的方式。
最好的问候,
Cherry
Even though clicking on the today's link focus is going to 2018 year instead of going to the current day i.e., 23/01/2018
{
var hit = this.monthCalendar1.HitTest(e.Location);
if (hit.HitArea == MonthCalendar.HitArea.TodayLink)
{
monthCalendar1.SetDate(DateTime.Today)
}
}
Hi Anil,
I add monthCalendar1 control on the form, and if I select another date, for example 2015-01-02 , can go to today date by clicking today link at the bottom of monthCalendar1 . When you just select year in year view, but cannot go to today date by clicking today link.
By my search, in the year view, I don't find other way to go to today date by clicking today link .
Best Regards,
Cherry
这篇关于当MonthCalender位于Year View中时,单击MonthCalender上的Todays链接无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!