Join Gini von Courter for an in-depth discussion in this video Inserting a DatePicker control, part of Word 2007: Forms in Depth.
The Date Picker Control allows a user to easily choose today or to navigate to and choose a different date using a calendar control like they would in Microsoft Outlook, for example. We have one date that we need to use right here, so we're going to go back into Design mode and the Date Picker is this grid that looks like it has one square highlighted that would stand for today. So we're going to choose the Date Picker Content Control and drop it in right here, then we're going to view its Properties, a lot of interesting properties here.
This is actually Today's Date, or today, or more formally for a form, submit date. We want this control to not be able to be deleted, and then we have a whole range of ways that we can show the date. Then we can store this either as a Date, as Date and Time, or as Text. If we choose, for example, 5/5 6:08 PM or one of these others, there is actually no way for this control to get information from Microsoft Windows to tell you what time it is.
In other words, don't bother to choose any of these down here when you're using the Date Picker on a Word form. But anything up here is fair game and there might be a time, for example, on a contract where you'd like it to have the day of the week, something very specific, or you might simply want the shortest date, it's a form used internally in your office, it actually only is used in the United States, and there's a nice clear short date that will work just fine for us. Whatever format you choose, when you're all done, simply click OK. We're going to store this as a date.
We're all set we're going to leave Design mode. Take a look, make sure that our date works. We choose Today. It works just fine . It uses a format I've specified. Let's go back to Design mode so that we can clean out that data that I just tested. Hit the arrow to once again have it come back to enter a date and we're going to say Choose today's date. Now this takes up a little more space than I would like it to take up. So I have the choice, I guess, to just say Choose today, or say Today's date.
Once the user gets in there, it's not hard for them to figure out what to do. Oh, it's today; alright there is a big Today button. So that seems to work. So welcome to the Date Picker a really nice looking control. When users first see this on a form that you create, this is the control that makes them go, Oh, this person really knows what they're doing putting this form together. So don't be afraid to use it, don't be afraid to format the date itself in any of those ways that seem like they'll work really well for you. This is the only Date Picker that we need to use in this form, so we're going to move immediately to talk about how we deal with yes/no choices, like you would traditionally put in a check box in legacy Word forms.
Prerequisite Course: Word 2007 Essential Training
- Customizing pre-built Microsoft.com templates
- Inserting content controls
- Saving a form as a template
- Troubleshooting form issues
- Understanding Building Blocks
- Creating a schema using the Content Control Toolkit