Folgende Properties im Designer setzen:

DateTimePicker1.ShowUpDown = True DateTimePicker1.CustomFormat = "MMMMyyyy" DateTimePicker1.Format = DateTimePickerFormat.Custom

Um ungültige Datumswerte zu vermeiden, wird das Tages-Datum des DateTimePickers immer auf 1 gesetzt:

Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) _ Handles DateTimePicker1.ValueChanged If DateTimePicker1.Value.Day <> 1 Then DateTimePicker1.Value = DateSerial(DateTimePicker1.Value.Year, DateTimePicker1.Value.Month, 1) End If End Sub



QR-Code for this page
QR - Code -
  URL for this page

© Thx to {Less}Allrounder

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.