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
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.