Implementation Steps:
Some time Use want to Show/Hide Time Field Component based on their Requirement
To Achieve that we need to write some JavaScript to enable and disabled Component
Syntax:
formContext.getControl(arg).setShowTime(bool);
arg = Field Logical Name
bool = true/false
To Enable time Component:
function enableTimeComponent(executionContext){
var formContext = executionContext.getFormContext();
formContext.getControl("FieldLogicalName").setShowTime(true);
}
To Disable time Component:
function enableTimeComponent(executionContext){
var formContext = executionContext.getFormContext();
formContext.getControl("FieldLogicalName").setShowTime(false);
}
That's it 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.