SHARE
TWEET

Untitled

a guest Jun 20th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dateTimePicker1.Format = DateTimePickerFormat.Custom;
  2. dateTimePicker1.CustomFormat = " ";
  3.      
  4. public void CreateMyDateTimePicker()
  5. {
  6.    // Create a new DateTimePicker control and initialize it.
  7.    DateTimePicker dateTimePicker1 = new DateTimePicker();
  8.  
  9.    // Set the MinDate and MaxDate.
  10.    dateTimePicker1.MinDate = new DateTime(1985, 6, 20);
  11.    dateTimePicker1.MaxDate = DateTime.Today;
  12.  
  13.    // Set the CustomFormat string.
  14.    dateTimePicker1.CustomFormat = "MMMM dd, yyyy - dddd";
  15.    dateTimePicker1.Format = DateTimePickerFormat.Custom;
  16.  
  17.    // Show the CheckBox and display the control as an up-down control.
  18.    dateTimePicker1.ShowCheckBox = true;
  19.    dateTimePicker1.ShowUpDown = true;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top