Thursday, July 25, 2013

How to make date time picker read-only in InfoPath 2010?

In this post we will discuss how to make date time picker read-only in InfoPath 2010. Also you can check out my previous posts on:
- Get internal name of a field in SharePoint 2010

- Attach event receivers to SharePoint list using PowerShell

- How to get userprofile properties in SharePoint 2013 object model?

There are certain controls like Textbox, Rich Text Box can made read only by simply right click and go to the properties and then navigate to the Display tab and then select the check box Read-only . But controls like Dropdownlist, Check box, Date Picker, Date and Time Picker we can not make read-only like this.
To an alternative approach you can add rules to the control and you can make disable the control.

Or You can use Conditional Formatting to make the control disable.

But if you really do not need user to select a date, then it is better to use a Text box and set a formula Today() or Now() which will populate the current date to the textbox.

Summery is if you want to make a date and time picker control read-only in InfoPath 2010, you must use conditional formatting.

No comments:

Post a Comment