InfoPath date and time picker with time drop-down list
This InfoPath demo is the completed solution for recipe 67 of InfoPath 2010 Cookbook in which a drop down list box is used to select time for an InfoPath date and time picker control.
In recipe 67 you will learn how to change the time text box of a date and time picker control into a drop-down list box for easy time selection.
Get more solutions from InfoPath 2010 Cookbook which is available on Amazon.com
Watch the next InfoPath demo: Cascading drop down lists in an InfoPath repeating table
InfoPath demo video transcript:
A normal date and time picker control in InfoPath consists of a date picker control in which you can enter a date and a text box in which you can type in a time. To make it easier for users to enter a time, you may want to convert this text box into a drop-down list box as this recipe does.
Here I've got an InfoPath form on which I've placed a converted date and time picker control, a normal date and time picker control which gets its value from the converted date and time picker control, and a text box control that gets its XML value from the converted date and time picker control.
If I select a date from the converted date and time picker control, you'll see that the date is updated as expected in the other two controls. And if I select a time, the same thing happens. If I select a different date, you'll see that the date is updated and the time is taken from the previously selected time.
Related InfoPath Demo Videos:
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.