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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -