Hide a Date Picker Control - Shiraz Cupala
in

InfoPath Dev

Shiraz Cupala

Hide a Date Picker Control

Have you ever tried to hide a date picker control using conditional formatting? Well you can’t! We don’t know why this option is disabled on the conditional formatting dialog. InfoPath 2007 doesn’t fix this either. We know you still need to hide those date pickers. Here’s a trick.

Wrap the date picker in a section control and then set the conditional formatting on that control. You have to bind the section control to something, and I recommend just binding it to the same date node itself so the relationship is clear and to avoid extra nodes in your data source / schema.

To do this easily you need to switch to the Data Source task pane and then find the node which corresponds to your date picker control. The fastest way is to just again click on the date picker control, and the appropriate node will be selected. Then “right-drag” and drop the particular date node from the tree to your view. You will be presented with a menu of additional control insertion options. Select the “Section” control. There you have your section. Now drag and drop your date picker into that and set the conditional formatting on the section.

Comments

 

Shiraz Cupala said:

条件付き書式を使って、日付けの選択コントロールを隠そうとしたことがありますか?実は、これが出来ないのです!何故このオプションが 無効にされているのかは謎ですが、InfoPath 2007でもこの点は改善されていません。それでも日付けの選択コントロールを隠したい場合のために、ちょっとした細工をお教えしましょう。

November 2, 2006 3:53 PM
 

stph725 said:

Just a word of caution I couldn't get the conditional formatting to work with just a regular section field it had to be an optional section bound to the date field.

January 12, 2012 5:46 AM
 

tofuflower said:

I had the same problem. Change the date picker control to a text box and then you can hide it.

April 30, 2014 8:01 AM

About Shiraz Cupala

Shiraz worked for 10 years at Microsoft in product design, web development, customer research, and online marketing roles. Over the first 3 versions of Microsoft InfoPath he managed Outlook, Excel and SharePoint integration, the hosted InfoPath control, IW and developer programmability features, product usability, and internal solutions. He has architected numerous small and enterprise level InfoPath solutions including for collaboration, publshing, and finance, including the InfoPath solution for Microsoft's expense reporting system. Shiraz holds a Bachelor of Arts in Philosophy from Tufts University.
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.