Introduction

Introducing DateTimePicker for Excel (previously DatePicker for legacy versions)

Flexible Date Restriction with Single Date Selection from a UserForm Popup Calendar in a Worksheet or from a Textbox on a UserForm for Excel 2016 (32bit or 64bit, Version 16). Now featuring additional Time Picker and various modifications to the UI/Code

DateTimePicker is my latest Draggable, Popup Calendar-style Dialog allowing you to select a single Date or a Date and Time and return it to the Cell. DateTimePicker is built using a standard Excel UserForm. DatePicker is similar to my Popup Calendar Software but doesn't use an embedded image to restyle the Dialog, is more compact and has a different look and feel to it. You can toggle the Months and restrict the Date range to a specific consecutive Day range (ie. Monday to Sunday for the current week), a single Month (October 2021) or a specific consecutive Week range (next 2 weeks). You can use my DatePicker with a UserForm to return a Date to a Textbox control. You can dismiss the DatePicker using the Escape {ESC} key. You can position the DatePicker right next to the ActiveCell in a Worksheet and drag the DatePicker around using the left Mouse Button. DatePicker allows for very flexible Date restrictions ie. allow Mondays only to be Booked for the next 4 Years. There are toggle arrows for the Years and you can left/right-click on the Header to increment the Months. New for version 1.3, Tooltips, Hand Cursor and Scale capability to resize the Dialog on-the-fly. Version 1.4 goes a little deeper into using the DateTimePicker on a UserForm


   
     
     
     

If you purchase this Project, I will include the following Excel Software in the download for FREE!


Popup Calendar

Prerequisites

  • Microsoft Excel 2016 Version 16 (32bit or 64bit) · designed for Office 365
  • Basic to moderate Excel Skills and some VBA skills to import Code Modules into own Project if not using the purchased Spreadsheet
  • Windows PC · NOT a Mac!
  • No support is provided for customization of this Software

Features

  • New from Version 1.3, DateTimePicker now includes the ability to Pick a Time and has been renamed to DateTimePicker
  • FadeIn and FadeOut the DateTimePicker
  • Draggable UI Interface - move the DateTimePicker around with the Mouse
  • Browse previous and next Calendar Months using the tiny left/right arrow Icons at the bottom of the DateTimePicker
  • New for version 1.3, browse previous and next Calendar Years using the tiny max left/max right arrow Icons at the bottom of the DateTimePicker
  • New for version 1.3, go back to the current Calendar Month using the tiny Refresh Icon at the bottom right of the DateTimePicker
  • New for version 1.3, automatically select the Date and highlight the Day on the DateTimePicker when it is opened and navigate with the persisting Date
  • New for version 1.3, a Close Cross has been added to the Dialog UI as Standard to allow a user to simply Cancel the Dialog or Date & Time Picker request. Both the Font Colour and Rollover Colour can be changed
  • Use as Modal or Modeless DateTimePicker
  • Hover highlighting effect on the Dates
  • Use the DatePicker with a UserForm
  • Menu Elipse Icon for version 1.3, to bring up a Quick Pick Month and Year Overlay. This makes it easy to choose a Date like for example a Birthday where you would need a lot of clicks to navigate the Date. To exit the Menu after making your Selections, choose Confirm Tick or Exit using Close Cross or via the Escape {ESC} Key. There is also a global variable that can be set to force the Dialog directly into this 'Birthday Date Selection' mode
  • Press {ESC} while using the DateTimePicker to dismiss the Dialog
  • Mouse Click anywhere on the Worksheet to dismiss the Calendar Dialog
  • An Escape Message that displays to the user Text of press {ESC} to exit in SemiLight Segoe UI that can be turned on by adding a line of Code to your Subroutine to launch the DateTimePicker
  • Set a Selected Day Foreground and Background Colour. This should NOT be the same as the Theme! Colours can be vbRed or a Long Colour or a VB Hex Colour. If the Cell has a Date in it you can use this to set the Date on the Calendar when it launches and it will highlight the Day
  • The DateTimePicker Dialog has the ability to automatically set and scroll to the respective current Start Date of the Dialog in the Menu for the Month and Year ListBox Selections
  • You can now Scale the DateTimePicker Dialog as a percentage ie. for a slightly smaller Dialog use Scaler:=0.9 which is 90%
  • An option to change the Cursor to a Hand for any of the Labels on the Dialog is provided
  • Tooltips are now set as standard on the Dialog with the Cursor changing to a Hand (if set) whenever a Tooltip is available
  • DateTimePicker positioning - use horizontal and vertical adjustments to position the DateTimePicker next to the Cell
  • Restrict the Date Range of the Calendar ie. between 2 Months or >= Current Month etc.
  • Pick a Date for one Cell and then another for another Cell in one operation - see Example 6
  • Start the Calendar on a Monday or a Sunday with the Weekend Days Shaded in Grey
  • Choose a different Theme for the Colour of the DateTimePicker - see Examples 10 & 11
  • Apply a specific Month Format to the Calendar Title for the Month and Year when it is displayed
  • Apply a specific Cell Date Format whenever a Calendar Date is picked
  • Change the Border Colour of the IDialog UserForm
  • DateTimePicker automatically closes whenever a user selects another Worksheet in the Workbook
  • Use Left & Right Mouse clicks on the Placeholder Header for the Title to Increment/Decrement the Months (new from version 1.3, reverse the Mouse Button direction)
  • Restrict specific Dates on the Calendar ie. the Monday until the Sunday for the current Week based upon Todays Date - see Example 12
  • Restrict Single Day Dates on the Calendar for a specific interval ie. "01|12|18" - see Example 15, I have allowed the Single Day Dates 1st, 12th and 18th of any Month to be picked from the current Month until the next 6 Months only
  • Restrict multiple whole Dates - see Example 16, I have allowed the Multiple Dates 08/10/2021, 15/10/2021, 22/10/2021, 19/11/2021 and 24/12/2021 only (nothing else can be Selected on the DateTimePicker)
  • Restrict every Monday Days on the Calendar for the next 4 Years - see Example 17, Here we will restrict every Monday for Bookings between 2021 and 2024
  • The Download includes an examples Sheet containing demonstrations of how to use the DateTimePicker
  • As it is a small resource, the Download Zip File contains all of the Versions of the DateTimePicker so far and the Class and Code Modules for the latest Version for direct Import into Excel
  • The Download includes my Popup Calendar Software FREE of charge







Installation

Unzip the DateTimePicker.zip File and open DateTimePicker.xlsm or the latest File ie. DateTimePicker-v1.3.xlsm (multiple Files are included in the Zip File as the resouce is small, so you will have a bunch of Files to play around with)

Test the examples to see what DatePicker can do. If you want, you can now start your own Project using the File or you can start from scratch by importing the Code Modules which are in the zip archive

Notice that I have also included the Popup-Calendar files as well - purchasing DatePicker gives you both Projects!

Usage

How to use DatePicker


Examples
On this Sheet you will find all of the DateTimePicker examples. The VBA Code used for all of these examples is in the Examples, Worksheet Code Module

The following examples are available:
1. Modeless - trigger from an Icon.  Start Date for current Month.  Select Date, click anywhere or press {Esc} to dismiss the DateTimePicker
2. Modeless - trigger from an Icon.  Start Date for next Month.  Select Date, click anywhere or press {Esc} to dismiss the DateTimePicker. Year change arrows are switched on
3. Modeless - trigger from a single Cell selection by the Mouse.  Select Date, click anywhere or press {Esc} to dismiss the DateTimePicker
4. Model - trigger from a single Cell selection by the Mouse.  Select Date or press {Esc} to dismiss the DateTimePicker. Year change arrows are switched on
5. Modeless - trigger from a single Cell selection by the Mouse and set the Month/Year Date if it already exists in the Cell.  Select Date, click anywhere or press {Esc} to dismiss the DateTimePicker
6. Select between 2 Dates
7. Restrict Date Range to October 2021 and output a reformatted Date ie. 8-Oct (dd-mmm)
8. Restrict Date Range to anything >= current Month and output a reformatted Date
9. Restrict Date Range up until the end of next Month and output a reformatted Date
10. Alternative Blue Colour Theme. Year change arrows are switched on
11. Alternative Slate Colour Theme. Year change arrows are switched on
12. Restrict Date from the Monday of the current Week until the Sunday of the current Week depending on Todays Date. Year change arrows are switched on
13. UserForm Example. Click the Icon to bring up a dummy UserForm and see how you can use it for your UserForms.  You can set the UserForm itself to Modal or Modeless.  The demonstration shown then has the DatePicker set to a Modal DateTimePicker
14. Alternative Burnt Orange Colour Theme. Year change arrows are switched on.  This example also changes the Idialog.BorderColor to Burnt Orange

Version 1.1
15. Demonstrating the use of Single Day Dates to restrict the Calendar.  I have allowed the Single Day Dates 1st, 12th and 18th of any Month to be picked from the current Month until the next 6 Months only
16. Demonstrating the use of Multiple Dates to restrict the Calendar.  I have allowed the Multiple Dates 08/10/2021, 15/10/2021, 22/10/2021, 19/11/2021 and 24/12/2021 only - Nothing else will be allowed, period!
17. Here we will restrict every Monday for Bookings between 2021 and 2024.  This is pretty cool and gives you a lot of lexibility when allowing users to make Bookings using your DateTimePicker!
18. Restrict by a list of Dates in a Worksheet

Version 1.2
19. Start the Calendar on a Monday as opposed to a Sunday (default).  Notice now that the two Weekend Colours are in sequence

Version 1.3
20. Allow the use of the new additional Time Picker.  Let's start the Calendar Week on a Monday and we will Merge 2 Cells together as the output will be a Date & Time.  We will also reverse the Mouse Buttons Direction when advancing the Calendar Months
21. Allow the use of the Time Picker and we will simply do a 24 Hour Time Field spaced at 1 Minute intervals
22. Model - trigger from a single Cell selection by the Mouse.  Select a valid Date and Time or press {Esc} to dismiss the DateTimePicker. Year change arrows are switched on
23. Allow the use of the Menu to select a Date like a Birthday quicker.  You can use the Escape {ESC} Key to exit either the Menu and / or the DateTimePicker Dialog - Try it!
24. Similar to the above Example 23 but we will change the Border Colour of the Menu Window and we will use a Modeless DateTimePicker meaning clicking anywhere in the Sheet will exit
25. A Darker Blue Calendar Theme with Time Picker and Menu displayed as a Modal Dialog meaning we must have some Entry although Escape {ESC} Key will still Exit
26. Let us create a Calendar that is only Bookable for Mondays to Fridays for the Hours of 9 until 5 from 5 Years ago until 5 Years in the future

Ultimate Dialogs

27. Modal Dialog 1.  A DateTimePicker in Dark Blue Theme to Pick a Date with a Quick Menu, all of the best features set including picking up the Date again after selection - we set the Dialog position next to the Calendar Icon & change the Dialog Border Colour to match the Theme 

28. Modal Dialog 2.  A DateTimePicker in Dark Blue Theme (as Modal Dialog 1.) but used to Pick a Birth Date launching directly into the Quick Menu.  Press {ESC} twice to exit everything

29. Modeless Dialog 3.  A DateTimePicker in Slate Theme allowing a Mouse Click anywhere in the Sheet to close the Dialog



Calling the DatePicker
To bring up a Modeless DatePicker Calendar from a click on an Icon, Button or Shape Object, link a Macro ie. Example1() to your Icon (or Object) and then use the following Code:
Public Sub Example1()
   ThisWorkbook.ActiveSheet.Range("B10").Activate
   DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy"
   DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False
End Sub
To bring up a Modeless DateTimePicker Calendar from a click in a specific Cell use the following Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Not Application.Intersect(Me.Range("B10"), Range(Target.Address)) Is Nothing Then
      If Target.CountLarge = 1 Then Example1
   Else
      DateTimePicker.Running = False
      DateTimePicker.StartDate = 0
      Erase cls
      Unload IDialog
   End If
End Sub

Public Sub Example1()
   ThisWorkbook.ActiveSheet.Range("B10").Activate
   DateTimePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy"
   DateTimePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False
End Sub

Parameters
You can pass the following Optional Parameters for the DatePicker.Init() subroutine. FadeIn/FadeOut are boolean values either True or False. FadeSpeed is a number, the larger the number the quicker the fade. Month Format is the Date format shown at the top of the Popup Dialog passed as a String. Format Active Cell is the Date format of the Cell where the Date is returned to passed as a String. Theme is an allowed Enum (or long) Colour Theme that you can maintain in the DatePicker Code Module - there are 3 available enumerations, Default, Blue and Slate. DateFrom and DateTo are Optional Dates in a variety of formats that you can set to restrict the Dates allowed on the DatePicker Calendar - they must be passed as Date specific but you can use the DateSerial function as well. AllowYearChange renders an additional 2 arrows that can be used to move up or down through the Calendar years - it is set to False by default. AllowUseOnUserForm should only be set to True when you are using the DatePicker on a UserForm. AllowQuickMonthChange set to True will let you quickly increment and decrement the Months on the DatePicker by clicking anywher in the header
DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, MonthFormat:="mmm yy", FormatActiveCell:="dd/mm/yyyy", Theme:=Slate, DateFrom:=Date - Weekday(Date, 2) + 1, DateTo:=Date - Weekday(Date, 2) + 7, AllowYearChange:=True, AllowUseOnUserForm:=False, AllowQuickMonthChange:=True

You can pass the following Optional Parameters for the DatePicker.Popup() subroutine. Left Adjustment is the adjustment to position the Popup Dialog horizontally next to the Cell. Top Adjustment is the adjustment to position the Popup Dialog vertically next to the Cell - both positive and negative values are allowed. Dismiss By Escape allows the Popup Dialog to be dismissed by pressing the Escape {ESC} Button. Modal Dialog can be True for a Modal Dialog or False for a Modeless Dialog (Modeless means that you can select another Cell in the Worksheet to dismiss the Dialog or to populate it with a Date if you want - this will require a slight Code change to the way that you use the DatePicker)
DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False

Setting the initial Date for the DatePicker
There may be times when you want to set the Month Date that you want to display by default when you launch the DatePicker when a user clicks into a Cell that may or may not already contain a Date. This can be done by setting the extended DatePicker Property like this (wrapped using an error skip just in case text or some other format currently exist in the Cell which is less complicated than checing for any kind of valid Date):
On Error Resume Next
If ActiveCell.Value2 <> vbNullString Then DatePicker.StartDate = DateSerial(Year(ActiveCell.Value), Month(ActiveCell.Value2), 1)
On Error GoTo 0

Using Multiple DatePickers to return Dates for 2 Cells
There may be a time that you want to use the DatePicker to return Dates for multiple Cells ie. a Start Date and then an End Date for some reason. To do this you can use Code like this (notice the aditional wrapping of the checks for the DatePicker Property DatePicker.Running and the pause loop as we wait for the DatePicker UserForm to become invisible meaning that it has just closed):
   If DatePicker.Running = False Then
      ThisWorkbook.ActiveSheet.Range("B30").Activate
      DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy"
      DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False
   End If
   Do While IDialog.Visible = True
      DoEvents
   Loop
   If DatePicker.Running = False Then
      ThisWorkbook.ActiveSheet.Range("D30").Activate
      DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy"
      DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False
   End If

Using an Alternative Theme
3 Themes are added as an Enum at the top of the DatePicker Code Module to change the look and feel of the DatePicker Colours. The Header or Titlebar and the Hover Colours are both changed whenever a Theme is changed. Current Themes are Default (Green), Blue and Slate. You can change the Theme for the DatePicker to Slate (or Carbon effect) Colours like this (you can easily build up any types of Themes that you want for the DatePicker - the Enum can be VBHex or Long variable data types):
   DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy", Theme:=Slate
   DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False

Restricting the Date Ranges on the DatePicker Calendar
There may be times when you want to ask a user for a Date whereby to avoid additional checking using Code, you would like to restrict the DatePicker Calendar so that the only Dates a user can select are ones that you want back. For example, suppose you are only concerned with Dates in the current week. To force a user to return either Blank (the DatePicker was cancelled) or a Date that falls from a Monday to a Sunday in the current week you can use Code like this (notice that I use variables to derive the start and end Dates prior to passing them in the DatePicker.Init() Parameters - all Dates falling outside of these will not be enabled on the Calendar):
  Dim StartOfWeek As Date
  Dim EndOfWeek As Date
  StartOfWeek = Date - Weekday(Date, 2) + 1
  EndOfWeek = Date - Weekday(Date, 2) + 7
  ThisWorkbook.ActiveSheet.Range("B54").Activate
  DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd-mmm", Theme:=Slate, DateFrom:=StartOfWeek, DateTo:=EndOfWeek, AllowYearChange:=True
  DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False

Allowing only Mondays to be Booked using the DatePicker for the next 4 Years
DatePicker is very flexible in allowing how you let a user Select Dates from the Popup Calendar. From Version 1.1 I introduced Date Selections in the form of a String variable that can hold either single Dates ie. "01|05|19" meaning only allow the 1st, 5th or 19th Day of any Month or "01/10/2021|19/11/2021" meaning only allow 2 Dates to be Selected either 1st October 2021 or 19th November 2021. This functionality and the existing Date range functionality gives you pretty flexible Date restriction. Here I will restrict every Monday for Bookings between the current Year, 2021 and 2024. We do this by populating a String with every Monday for the 4 Year horizon. Whenever you use the DateSelections functionality you also have to set the DateFrom and the DateTo Dates, in the .Init() Method, but you can specify the full Date Horizon using the example DateSerials() below:
Private Sub Example17()
   ThisWorkbook.ActiveSheet.Range("B81").Activate
   
   ' let's fill a Pipe-delimited String with every Monday for 4 Years
   Dim ADate As Date
   Dim MyDates As String
   ADate = DateSerial(2021, 1, 1)
   If Weekday(ADate) = vbMonday Then MyDates = Format$(ADate, "dd/mm/yyyy")
   Do While Year(ADate) < 2025
      ADate = ADate + 1
      If Weekday(ADate) = vbMonday Then
         MyDates = MyDates & "|" & Format$(ADate, "dd/mm/yyyy")
      End If
   Loop
   
   DatePicker.UseDateSelections = True
   DatePicker.DateSelectionType = WholeDates
   DatePicker.DateSelections = MyDates

   DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy", AllowYearChange:=True, Theme:=BurntOrange, AllowQuickMonthChange:=True, DateFrom:=DateSerial(1900, 1, 1), DateTo:=DateSerial(9999, 1, 1)
   DatePicker.Popup LeftAdjustment:=5, TopAdjustment:=5, DismissByEscape:=True, ModalDialog:=False
End Sub

Using the DatePicker on a UserForm
You may want to use the DatePicker on a UserForm to select a Date that can be returned to a Textbox Control. To do this you must set AllowUseOnUserForm to True in the DatePicker.Init() subroutine which tells the Code how to handle the DatePicker positioning and add some small additional Code to your UserForm before you launch it, for example, using 'UserForm1.Show'. The main 2 Property's that are required to be added are DatePicker.UserFormID which should be any valid UserForm Object or you can use the 'Me' tag which implies the active UserForm Object and DatePicker.TextBoxID which should be any valid Textbox Control Name (a String not the Control itself) like this (you can add these to specific Button or when the UserForm is Activated - then just use any standard call to the DatePicker subroutines to display it):
   ' required Properties!
   DatePicker.UserFormID = Me
   DatePicker.TextBoxID = Me.TextBox1.Name
   
   DatePicker.Init FadeIn:=True, FadeOut:=True, FadeSpeed:=12, FormatActiveCell:="dd/mm/yyyy", AllowUseOnUserForm:=True, AllowYearChange:=True
   DatePicker.Popup LeftAdjustment:=10, TopAdjustment:=50, DismissByEscape:=True, ModalDialog:=True

Protecting the Icons or Drawing Objects
To protect any Icons from user-interference or accidental right-clicks and movement you can use a subroutine like this: (run when you have finished coding - use Sheet->Unprotect to remove it and allow editing or movement again)
Private Sub ProtectDrawingObjectsInActiveSheet()
   ActiveSheet.EnableSelection = xlNoRestrictions
   ActiveSheet.Protect Contents:=False, UserInterfaceOnly:=True
End Sub

Changing the Border Colour
You can change the Colour of the IDialog Border before a call to either the DatePicker.Init() or DatePicker.Popup() subroutines like this:
IDialog.BorderColor = BurntOrange

Screen Shots

DateTimePicker latest UI in a Slate Theme with Escape Message positioning changed and detailing the Tooltips with the Mouse Cursor changing to a Hand. You can dismiss a Modeless Dialog via the Escape {ESC} Key or by clicking in any Sheet Cell

DateTimePicker latest UI in a Slate Theme displayed at 80% using the Scaler Named Arg

DatePicker Version 1.3 with new UI layout for the Icons and featuring the additional Time Picker. Calendar Month begins on a Monday instead of a Sunday

DatePicker Version 1.3 with new UI layout in Slate

DatePicker Version 1.3 with the additional Menu Icon in Green

DatePicker Version 1.3 detailing the Menu enabling you to change the Month and Year really quickly and then return back to the Calendar. Choose Confirm Tick or Exit using Close Cross or via the Escape {ESC} Key

DatePicker Version 1.3 - putting it all together with a Dark Blue Theme. Here we restrict the Time Slots to 9 to 5 and display the Dialog as a Modal Dialog. We also turn off the Mouse Click on the Header or Title Bar so we can Drag the Dialog about

DatePicker Version 1.3 - putting it all together with a Dark Blue Theme. Here we bring up the Menu allowing us to Select a Month and Year quickly

DatePicker Version 1.1 with a slightly darker Font Colour for the Weekend Dates

A Screenshot of the Examples Sheet for the DatePicker

A Screenshot of an Alternative Blue Colour Theme for DatePicker

A Screenshot of an Alternative Slate Colour Theme for DatePicker

A Screenshot of the DatePicker as I am about to increment the Year to 2022

A Screenshot of an Alternative Slate Colour Theme for DatePicker including the UserForm Border Colour and with the Year increment/decrement Arrows switched on

A Screenshot of the DatePicker being used together with a UserForm

A Screenshot of an Alternative Burnt Orange Colour Theme for DatePicker including a Burnt Orange IDialog Border Colour

DatePicker allowing a user to ONLY Book Mondays for the next 4 Years

FAQ

Q. Can I set a different Date when I display the DatePicker?
A. Of course. You can set the DatePicker.StartDate Property using the DateSerial function like this:
DatePicker.StartDate = DateSerial(Year(Date), Month(Date) + 1, 1) for the next Month or like this:
DatePicker.StartDate = DateSerial(2023, 2, 1) for the first of February 2023


Q. Can I set the DatePicker to allow only the first Day of any Month to be selected?
A. Yes from Version 1.1 you can do exactly this! To do this set: DatePicker.UseDateSelections = True, DatePicker.DateSelectionType = SingleDayDates and DatePicker.DateSelections = "01" and then set the DateFrom and the DateTo in the .Init() Method to DateFrom:=DateSerial(1900, 1, 1), DateTo:=DateSerial(9999, 1, 1) - this will allow the full Date range from the start of Excel Date calculation until the end and only allow the 1st of every Month to be Booked


Videos

This is the first video of the DateTimePicker in action. In this demonstration, I go through each of the examples on the Examples Sheet in the DateTimePicker File up until Example 5. Music Evil Empire (Original Mix) by Tycoos Get it Here · view this DatePicker video on YouTube

This is the second video of the DateTimePicker in action. In this demonstration, I go through each of the examples on the Examples Sheet in the DateTimePicker File from Example 5 onwards. Music Last Night In The Sky by Shake Get it Here · view this DatePicker video on YouTube

This is the third video of the additional DatePicker 1.2 Examples in action (taken from DateTimePicker 1.3). In this demonstration, I go through each of the examples on the Examples Sheet in the DateTimePicker File from Example 19 to 26. Music by Snake on the Beach - Nico Staf · view this DatePicker video on YouTube

This is the fourth video of the DatePicker 1.3 in action. In this demonstration, I go through each of the examples on the Examples Sheet for the Ultimate Dialog in the DateTimePicker File from Example 27 to 30. Music by Der König - Jeremy Black · view this DatePicker video on YouTube

Support

Support is 100% optional and I provide it for your convenience, so please be patient, polite and respectful

Support for my Software

  • Responding to questions or problems regarding the Software and its features
  • Fixing valid (replicated) bugs and reported issues for the VERSION I HAVE WRITTEN

Software support does not include

  • Customization and installation services
  • Support for third party software or ANY kind of development whatsoever

Before seeking support

  • Make sure your question is a valid Software Issue and not a customization request
  • Make sure you have read through the FAQ's, online documentation and any related video guides before asking support on how to accomplish a task
  • Ensure that you access to the VBOM is allowed and that Macros can run in Excel
  • Make sure to provide 'proof of purchase' and state the name / version of the Software that you are having issues with when requesting support by Email or via Facebook

How to get Support

Contact Mark Kubiszyn on the Email address provided when you purchased the Software, including the Order Number
Remember to be patient, if there has been an issue with your download, Mark will always respond within 48 hours and will Email you the File directly if neccessary. For other issues the response time may be considerably longer and I may choose to respond to specific questions only (as is my right), depending on what has been asked

Future Builds

* No ideas as yet!

Bug Fixes

* There are currently no bugs identified for DatePicker

Changelog

Read more information on the status of each release below. The latest Version including a description of any changes is shown first

16.6.2023 - (Version 1.4)

Updated some of the Demos to the current Month / Year
Created an Elapsed Date and Time Picker Demo using a UserForm - see Example 32
Fixed an issue where sometimes when using the Time part of the DateTimePicker the Dialog closes without the Time part (an Hour/Minute selection) being made

8.9.2022 - (Version 1.3)

Add the Optional ability to pass a list of Times and then Pick the Time from a Listbox which sits alongside the DatePicker Dialog. Following this major change, I have now renamed this Project to DateTimePicker
Navigate back instantly to the current Calendar Month using the tiny Refresh Icon at the bottom right of the DateTimePicker. This Icon has been added as Standard alongside the right Calendar Icon Arrows and is omni-present (as suggested by Hasan Cansue)
Reverse the Mouse Button direction when changing the Calendar Months using the Mouse. So if you prefer the Left Button to go back one Month this is now the Standard design and if you prefer how I originally designed the DatePicker then you can set this from False to True to retain the setting from Version 1.2 so that the Left Button advances the Calendar Month
Change the UI slightly so that the Arrows are positioned differently and more akin to a normal Date Picker look and feel (as suggested by Hasan Cansue)
Added a Menu Elipse Icon to bring up a Quick Pick Month and Year Overlay. This makes it easy to choose a Date like for example a Birthday where you would need a lot of clicks to navigate the Date (as suggested by Hasan Cansue)
Added the ability to set a Selected Day Foreground and Background Colour. This should NOT be the same as the Theme! Colours can be vbRed or a Long Colour or a VB Hex Colour
Added the ability of automatically selecting the Date and highlight the Day on the DateTimePicker when it is opened and navigate with the persisting Date
Added an Escape Message that displays to the user Text of press {ESC} to exit in SemiLight Segoe UI that can be turned on by adding a line of Code to your Subroutine to launch the DateTimePicker
Added the ability to automatically set and scroll to the respective current Start Date of the Dialog in the Menu for the Month and Year ListBox Selections
Added the ability to set a Global Boolean variable to force the Menu to show to pick a Month and Year - this makes the Dialog extremely useful to pick a Birthday. I am going to call this 'Birthday Date Selection' mode
Add the ability to change the Cursor to a Hand for any of the Labels on the Dialog
Add a Close Cross to the Dialog as Standard to allow a user to simply Cancel the Dialog or Date & Time Picker request
Added Tooltips as standard on the Dialog with the Cursor changing to a Hand (if set) whenever a Tooltip is available
Add in the ability to Scale the Dialog as a percentage ie. for a slightly smaller Dialog use Scaler:=0.9 which is 90%

6.12.2021 - (Version 1.2)

A number of tweaks to allow more functionality to the DatePicker - see Example 19
19. Start the Calendar on a Monday as opposed to a Sunday (default)

11.10.2021 - (Version 1.1)

A number of tweaks to allow a more flexible, extensive range of Dates to be Selected on the Calendar - see Examples 15 through to 18
15. Demonstrating the use of Single Day Dates to restrict the Calendar
16. Demonstrating the use of Multiple Dates to restrict the Calendar
17. Here we will restrict every Monday for Bookings between 2021 and 2024
18. Restrict by a list of Dates in a Worksheet

Changed the default Font Forecolour of the Weekend Days to a slightly darker Colour so that when the Dates are not enabled, you can clearly tell what you are allowed to select if the Day falls on a Weekend

02.10.2021 - (Version 1 tweaks)

1. Add the ability for the DatePicker to automatically close whenever a user selects another Worksheet in the Workbook
2. Added in another demo to illustrate how to select two Dates
3. Added in the ability to restrict the Date Range on the Calendar ie. only allow users to select a Date within October 2021
4. Added the ability to pick different Themes for the DatePicker, currently restricted to Colours ie. Default Theme is Green, Blue is a Blue theme
5. Removed some of the 'If Not DatePicker.Running Then' statements as they are only required if Date restrictions are used
6. Added in the ability to restrict specific Dates on the Calendar ie. the Monday until the Sunday for the current Week based upon Todays Date
7. Added in the ability to use Left & Right Mouse clicks on the Placeholder Header for the Title to Increment/Decrement the Months

01.10.2021

General Release