c# - How to restrict user to select only current month dates in datetimepicker control? -


i want user select dates of current month don't know should put in min , max date property.

is there property of ' current month '?

since both mindate , maxdate property takes datetime, can set them like;

datetimepicker1.mindate = new datetime(datetime.now.year, datetime.now.month, 1);  datetimepicker1.maxdate = (new datetime(datetime.now.year, datetime.now.month, 1))                           .addmonths(1).adddays(-1); 

Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -