9

I can't find a minimum date (MinDate) property in the calendar control in WPF 4.0.

If there is no minimum date or maximum date property in the calendar control then how could I achieve the same?

brett rogers
  • 6,501
  • 7
  • 33
  • 43
Vishal
  • 6,238
  • 10
  • 82
  • 158
  • What are you trying to achieve? – JMK Jun 10 '13 at 12:51
  • I have two calendar controls. First is for Starting Date and Second is for Ending Date. So user should not be able to select the ending date smaller than the starting date. – Vishal Jun 10 '13 at 12:59

1 Answers1

24

Are you just looking to restrict the selectable beginning/ending dates? If so you can use DisplayDateStart and DisplayDateEnd:

    <Grid>
        <Calendar ... DisplayDateStart="5/1/2013" DisplayDateEnd="3/31/2014" />
    </Grid>
maxedev
  • 941
  • 8
  • 18