How to Set DateTimePicker Values to Current Month Range in VB.Net

This tutorial is all about How to Set DateTimePicker Values to Current Month Range in VB.Net. With this tutorial you can Set DateTimePicker Values to Current Month Range in VB.Net easily. So let’s get started:

The DateTimePicker control allows you to select a date and time by modifying the control’s displayed values. When you click the arrow in the DateTimePicker control, a month calendar appears, similar to a combo box. By clicking on the required date, the user can make a selection. The new selected value appears in the control’s text box.

  • First is open the Visual Basic, Select File on the menu, then click New and create a new project.

  • Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK

  • Design your form like this just like what I’ve shown you below.
    Add 2 DateTimePicker from the ToolBox.
  • After Designing your form, Add this code.
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    DateTimePicker1.Value = Today.Date.AddDays(-Today.Day + 1)
    DateTimePicker2.Value = Today.DateEnd Sub


  • Finally,Click F5 to run the Program.

If you have any comments or suggestion about on How to Set DateTimePicker to Current Month Range in VB.Net, Please Feel Free to contact our webpage.

Download Source Code! Here

Other articles you might read also:

Leave a Comment