1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace BLL
{
    public partial class FrmMonthCalendar : Form
    {
        public FrmMonthCalendar()
        {
            InitializeComponent();
        }
 
        public bool isSelected = false;
        public DateTime sDate;
 
        private void MC1_DateSelected(object sender, DateRangeEventArgs e)
        {
            isSelected = true;
            this.Hide();
        }
 
        private void FrmMonthCalendar_Activated(object sender, EventArgs e)
        {
            if (sDate < Convert.ToDateTime("1910-01-01"))
            {
                MC1.SelectionEnd = DateTime.Today;
                MC1.SelectionStart = DateTime.Today;
            }
            else
            {
                MC1.SelectionEnd = sDate;
                MC1.SelectionStart = sDate;
            }
            isSelected = false;
        }
 
 
    }
}