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
Post a Comment