Skip to content

Commit

Permalink
Rename timeZoneInput to DefaultTimeZoneInput
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetseckin committed Feb 20, 2020
1 parent b755f7c commit 261819d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion TimeZoneDisplay/ControlManifest.Input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<control namespace="MehmetSeckin" constructor="TimeZoneDisplay" version="0.0.1" display-name-key="TimeZoneDisplay" description-key="TimeZoneDisplay description" control-type="standard">
<!-- property node identifies a specific, configurable piece of data that the control expects from CDS -->
<property name="dateInput" display-name-key="DateInputDisplayName" description-key="DateInputDescription" of-type-group="dateonly-or-datetime" usage="input" required="true" />
<property name="timeZoneInput" display-name-key="TimeZoneInputDisplayName" description-key="TimeZoneInputDescription" of-type="SingleLine.Text" usage="input" required="false" />
<property name="defaultTimeZoneInput" display-name-key="DefaultTimeZoneInputDisplayName" description-key="DefaultTimeZoneInputDescription" of-type="SingleLine.Text" usage="input" required="false" />
<type-group name="dateonly-or-datetime">
<type>DateAndTime.DateOnly</type>
<type>DateAndTime.DateAndTime</type>
Expand Down
8 changes: 4 additions & 4 deletions TimeZoneDisplay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ export class TimeZoneDisplay implements ComponentFramework.StandardControl<IInpu
ReactDOM.render(
React.createElement(Display, {
date: this.getDateInput(context),
timeZone: this.getTimeZoneInput(context),
timeZone: this.getdefaultTimeZoneInput(context),
format: this.getDotNetFormatString(context),
options: this.getDotNetFormatOptions(context)
}),
this.container
);
}

private getTimeZoneInput(context: ComponentFramework.Context<IInputs>): string | null {
let timeZoneInput = context.parameters.timeZoneInput;
return !!timeZoneInput.security?.readable ? timeZoneInput.raw : 'local';
private getdefaultTimeZoneInput(context: ComponentFramework.Context<IInputs>): string | null {
let defaultTimeZoneInput = context.parameters.defaultTimeZoneInput;
return !!defaultTimeZoneInput.security?.readable ? defaultTimeZoneInput.raw : 'local';
}

private getDateInput(context: ComponentFramework.Context<IInputs>) : Date | null {
Expand Down
4 changes: 2 additions & 2 deletions TimeZoneDisplay/strings/TimeZoneDisplay.1033.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<data name="DateInputDescription">
<value>The date value that will be used as an input.</value>
</data>
<data name="TimeZoneInputDisplayName">
<data name="DefaultTimeZoneInputDisplayName">
<value>Time Zone</value>
</data>
<data name="TimeZoneInputDescription">
<data name="DefaultTimeZoneInputDescription">
<value>The IANA identifier of the target time zone.</value>
</data>
</root>

0 comments on commit 261819d

Please sign in to comment.