Fixed localization where missing

This commit is contained in:
Anders Mörtsell 2019-08-19 14:13:58 +02:00
parent 6538d8e493
commit 8a12f697f8
10 changed files with 207 additions and 90 deletions

View File

@ -43,12 +43,13 @@ import spservices from '../../services/spservices';
import { Map, ICoordinates, MapType } from "@pnp/spfx-controls-react/lib/Map"; import { Map, ICoordinates, MapType } from "@pnp/spfx-controls-react/lib/Map";
import { EventRecurrenceInfo } from '../../controls/EventRecurrenceInfo/EventRecurrenceInfo'; import { EventRecurrenceInfo } from '../../controls/EventRecurrenceInfo/EventRecurrenceInfo';
import { getGUID } from '@pnp/common'; import { getGUID } from '@pnp/common';
import { toLocaleShortDateString } from '../../utils/dateUtils';
const DayPickerStrings: IDatePickerStrings = { const DayPickerStrings: IDatePickerStrings = {
months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December], months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December],
shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez], shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez],
days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday], days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday],
shortDays: [strings.ShortDay_S, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Tursday, strings.ShortDay_Friday, strings.ShortDay_Saunday], shortDays: [strings.ShortDay_S, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Thursday, strings.ShortDay_Friday, strings.ShortDay_Sunday],
goToToday: strings.GoToDay, goToToday: strings.GoToDay,
prevMonthAriaLabel: strings.PrevMonth, prevMonthAriaLabel: strings.PrevMonth,
nextMonthAriaLabel: strings.NextMonth, nextMonthAriaLabel: strings.NextMonth,
@ -527,6 +528,16 @@ export class Event extends React.Component<IEventProps, IEventState> {
this.setState({ startDate: newDate }); this.setState({ startDate: newDate });
} }
/**
*
* @private
* @param date
* @memberof Event
*/
private formatDate(date: Date) {
return toLocaleShortDateString(date);
}
/** /**
* @private * @private
* @param {Date} newDate * @param {Date} newDate
@ -615,14 +626,14 @@ export class Event extends React.Component<IEventProps, IEventState> {
{ {
(this.state.eventData && (this.state.eventData.EventType !== "0" && this.state.showRecurrenceSeriesInfo !== true)) ? (this.state.eventData && (this.state.eventData.EventType !== "0" && this.state.showRecurrenceSeriesInfo !== true)) ?
<div> <div>
<h2 style={{ display: 'inline-block', verticalAlign: 'top' }}>Recurrence Event</h2> <h2 style={{ display: 'inline-block', verticalAlign: 'top' }}>{ strings.recurrenceEventLabel }</h2>
<DefaultButton <DefaultButton
style={{ display: 'inline-block', marginLeft: '330px', verticalAlign: 'top', width: 'auto' }} style={{ display: 'inline-block', marginLeft: '330px', verticalAlign: 'top', width: 'auto' }}
iconProps={{ iconName: 'RecurringEvent' }} iconProps={{ iconName: 'RecurringEvent' }}
allowDisabledFocus={true} allowDisabledFocus={true}
onClick={this.onEditRecurrence} onClick={this.onEditRecurrence}
> >
Edit Recurrence Series { strings.editRecurrenceSeries }
</DefaultButton> </DefaultButton>
</div> </div>
@ -658,6 +669,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
value={this.state.startDate} value={this.state.startDate}
label={strings.StartDateLabel} label={strings.StartDateLabel}
onSelectDate={this.onSelectDateStart} onSelectDate={this.onSelectDateStart}
formatDate={this.formatDate}
disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true} disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true}
hidden={this.state.showRecurrenceSeriesInfo} hidden={this.state.showRecurrenceSeriesInfo}
/> />
@ -729,6 +741,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
value={this.state.endDate} value={this.state.endDate}
label={strings.EndDateLabel} label={strings.EndDateLabel}
onSelectDate={this.onSelectDateEnd} onSelectDate={this.onSelectDateEnd}
formatDate={this.formatDate}
disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true} disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true}
hidden={this.state.showRecurrenceSeriesInfo} hidden={this.state.showRecurrenceSeriesInfo}
/> />
@ -799,9 +812,9 @@ export class Event extends React.Component<IEventProps, IEventState> {
<Toggle <Toggle
defaultChecked={false} defaultChecked={false}
inlineLabel={true} inlineLabel={true}
label="Recurrence ?" label={ strings.ifRecurrenceLabel }
onText="On" onText={ strings.onLabel }
offText="Off" offText={ strings.offLabel }
onChange={(ev, checked: boolean) => { onChange={(ev, checked: boolean) => {
ev.preventDefault(); ev.preventDefault();
this.setState({ showRecurrenceSeriesInfo: checked, newRecurrenceEvent: checked }); this.setState({ showRecurrenceSeriesInfo: checked, newRecurrenceEvent: checked });
@ -827,7 +840,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
) )
} }
< Label > Event Description</Label> < Label > {strings.eventDescriptionLabel }</Label>
<div className={styles.description}> <div className={styles.description}>
<Editor <Editor

View File

@ -84,29 +84,29 @@ export class EventRecurrenceInfo extends React.Component<IEventRecurrenceInfoPro
<div style={{ display: 'inline-block', verticalAlign: 'top' }}> <div style={{ display: 'inline-block', verticalAlign: 'top' }}>
<ChoiceGroup <ChoiceGroup
label="Recurrence Information" label={ strings.recurrenceInformationLabel }
selectedKey={this.state.selectedRecurrenceRule} selectedKey={this.state.selectedRecurrenceRule}
options={[ options={[
{ {
key: 'daily', key: 'daily',
iconProps: { iconName: 'CalendarDay' }, iconProps: { iconName: 'CalendarDay' },
text: 'Daily' text: strings.dailyLabel
}, },
{ {
key: 'weekly', key: 'weekly',
iconProps: { iconName: 'CalendarWeek' }, iconProps: { iconName: 'CalendarWeek' },
text: 'Weekly' text: strings.weeklyLabel
}, },
{ {
key: 'monthly', key: 'monthly',
iconProps: { iconName: 'Calendar' }, iconProps: { iconName: 'Calendar' },
text: 'Monthly', text: strings.monthlyLabel,
}, },
{ {
key: 'yearly', key: 'yearly',
iconProps: { iconName: 'Calendar' }, iconProps: { iconName: 'Calendar' },
text: 'Yearly', text: strings.yearlyLabel,
} }
]} ]}
onChange={this._onRecurrenceFrequenceChange} onChange={this._onRecurrenceFrequenceChange}

View File

@ -13,6 +13,7 @@ import {
MaskedTextField, MaskedTextField,
} from 'office-ui-fabric-react'; } from 'office-ui-fabric-react';
import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker'; import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker';
import { toLocaleShortDateString } from '../../utils/dateUtils';
import spservices from '../../services/spservices'; import spservices from '../../services/spservices';
@ -20,7 +21,7 @@ const DayPickerStrings: IDatePickerStrings = {
months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December], months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December],
shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez], shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez],
days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday], days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday],
shortDays: [strings.ShortDay_S, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Tursday, strings.ShortDay_Friday, strings.ShortDay_Saunday], shortDays: [strings.ShortDay_S, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Thursday, strings.ShortDay_Friday, strings.ShortDay_Sunday],
goToToday: strings.GoToDay, goToToday: strings.GoToDay,
prevMonthAriaLabel: strings.PrevMonth, prevMonthAriaLabel: strings.PrevMonth,
nextMonthAriaLabel: strings.NextMonth, nextMonthAriaLabel: strings.NextMonth,
@ -44,7 +45,7 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
super(props); super(props);
this.onPaternChange = this.onPaternChange.bind(this); this.onPatternChange = this.onPatternChange.bind(this);
this.state = { this.state = {
selectedKey: 'daily', selectedKey: 'daily',
selectPatern: 'every', selectPatern: 'every',
@ -85,6 +86,16 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
this.applyRecurrence(); this.applyRecurrence();
} }
/**
*
* @private
* @param date
* @memberof EventRecurrenceInfoDaily
*/
private formatDate(date: Date) {
return toLocaleShortDateString(date);
}
/** /**
* *
* *
@ -162,7 +173,7 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
}); });
this.applyRecurrence(); this.applyRecurrence();
} }
private onPaternChange(ev: React.SyntheticEvent<HTMLElement>, option: IChoiceGroupOption): void { private onPatternChange(ev: React.SyntheticEvent<HTMLElement>, option: IChoiceGroupOption): void {
ev.preventDefault(); ev.preventDefault();
this.setState({ this.setState({
selectPatern: option.key, selectPatern: option.key,
@ -294,7 +305,7 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
</div> </div>
<div style={{ width: '100%', paddingTop: '10px' }}> <div style={{ width: '100%', paddingTop: '10px' }}>
<Label>Patern</Label> <Label>{ strings.patternLabel }</Label>
<ChoiceGroup <ChoiceGroup
selectedKey={this.state.selectPatern} selectedKey={this.state.selectPatern}
options={[ options={[
@ -325,13 +336,13 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
text: strings.everyweekdays, text: strings.everyweekdays,
} }
]} ]}
onChange={this.onPaternChange} onChange={this.onPatternChange}
required={true} required={true}
/> />
</div> </div>
<div style={{ paddingTop: '22px' }}> <div style={{ paddingTop: '22px' }}>
<Label>Date Range</Label> <Label>{ strings.dateRangeLabel }</Label>
<div style={{ display: 'inline-block', verticalAlign: 'top', paddingRight: '35px', paddingTop: '10px' }}> <div style={{ display: 'inline-block', verticalAlign: 'top', paddingRight: '35px', paddingTop: '10px' }}>
<DatePicker <DatePicker
@ -342,6 +353,7 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
label={strings.StartDateLabel} label={strings.StartDateLabel}
value={this.state.startDate} value={this.state.startDate}
onSelectDate={this.onStartDateChange} onSelectDate={this.onStartDateChange}
formatDate={this.formatDate}
/> />
</div> </div>
@ -368,8 +380,10 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
ariaLabel="Select a date" ariaLabel="Select a date"
style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }} style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }}
onSelectDate={this.onEndDateChange} onSelectDate={this.onEndDateChange}
formatDate={this.formatDate}
value={this.state.endDate} value={this.state.endDate}
disabled={this.state.disableEndDate} disabled={this.state.disableEndDate}
/> />
</div> </div>
); );
@ -390,7 +404,7 @@ export class EventRecurrenceInfoDaily extends React.Component<IEventRecurrenceIn
disabled={this.state.disableNumberOcurrences} disabled={this.state.disableNumberOcurrences}
errorMessage={this.state.errorMessageNumberOcurrences} errorMessage={this.state.errorMessageNumberOcurrences}
onChange={this.onNumberOfOcurrencesChange} /> onChange={this.onNumberOfOcurrencesChange} />
<Label styles={{ root: { display: 'inline-block', verticalAlign: 'top', paddingLeft: '10px' } }}>Ocurrences</Label> <Label styles={{ root: { display: 'inline-block', verticalAlign: 'top', paddingLeft: '10px' } }}>{ strings.occurrencesLabel }</Label>
</div> </div>
); );
} }

View File

@ -16,6 +16,7 @@ import {
} from 'office-ui-fabric-react'; } from 'office-ui-fabric-react';
import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker'; import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker';
import { toLocaleShortDateString } from '../../utils/dateUtils';
import spservices from '../../services/spservices'; import spservices from '../../services/spservices';
import { string } from 'prop-types'; import { string } from 'prop-types';
@ -24,7 +25,7 @@ const DayPickerStrings: IDatePickerStrings = {
months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December], months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December],
shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez], shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez],
days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday], days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday],
shortDays: [strings.ShortDay_S, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Tursday, strings.ShortDay_Friday, strings.ShortDay_Saunday], shortDays: [strings.ShortDay_S, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Thursday, strings.ShortDay_Friday, strings.ShortDay_Sunday],
goToToday: strings.GoToDay, goToToday: strings.GoToDay,
prevMonthAriaLabel: strings.PrevMonth, prevMonthAriaLabel: strings.PrevMonth,
nextMonthAriaLabel: strings.NextMonth, nextMonthAriaLabel: strings.NextMonth,
@ -111,6 +112,15 @@ export class EventRecurrenceInfoMonthly extends React.Component<IEventRecurrence
this.applyRecurrence(); this.applyRecurrence();
} }
/**
*
* @private
* @param date
* @memberof EventRecurrenceInfoMonthly
*/
private formatDate(date: Date) : string {
return toLocaleShortDateString(date);
}
/** /**
* *
* *
@ -580,6 +590,7 @@ export class EventRecurrenceInfoMonthly extends React.Component<IEventRecurrence
label={strings.StartDateLabel} label={strings.StartDateLabel}
value={this.state.startDate} value={this.state.startDate}
onSelectDate={this.onStartDateChange} onSelectDate={this.onStartDateChange}
formatDate= {this.formatDate}
/> />
</div> </div>
@ -606,6 +617,7 @@ export class EventRecurrenceInfoMonthly extends React.Component<IEventRecurrence
ariaLabel={strings.StartDatePlaceHolder} ariaLabel={strings.StartDatePlaceHolder}
style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }} style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }}
onSelectDate={this.onEndDateChange} onSelectDate={this.onEndDateChange}
formatDate={this.formatDate}
value={this.state.endDate} value={this.state.endDate}
disabled={this.state.disableEndDate} disabled={this.state.disableEndDate}
/> />

View File

@ -14,24 +14,25 @@ import {
Checkbox, Checkbox,
} from 'office-ui-fabric-react'; } from 'office-ui-fabric-react';
import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker'; import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker';
import { toLocaleShortDateString } from '../../utils/dateUtils';
import spservices from '../../services/spservices'; import spservices from '../../services/spservices';
const DayPickerStrings: IDatePickerStrings = { const DayPickerStrings: IDatePickerStrings = {
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], months: [strings.January, strings.February, strings.March, strings.April, strings.May, strings.June, strings.July, strings.August, strings.September, strings.October, strings.November, strings.December],
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], shortMonths: [strings.Jan, strings.Feb, strings.Mar, strings.Apr, strings.May, strings.Jun, strings.Jul, strings.Aug, strings.Sep, strings.Oct, strings.Nov, strings.Dez],
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], days: [strings.Sunday, strings.Monday, strings.Tuesday, strings.Wednesday, strings.Thursday, strings.Friday, strings.Saturday],
shortDays: ['S', 'M', 'T', 'W', 'T', 'F', 'S'], shortDays: [strings.ShortDay_Sunday, strings.ShortDay_M, strings.ShortDay_T, strings.ShortDay_W, strings.ShortDay_Thursday, strings.ShortDay_Friday, strings.ShortDay_S],
goToToday: 'Go to today', goToToday: strings.GoToDay,
prevMonthAriaLabel: 'Go to previous month', prevMonthAriaLabel: strings.PrevMonth,
nextMonthAriaLabel: 'Go to next month', nextMonthAriaLabel: strings.NextMonth,
prevYearAriaLabel: 'Go to previous year', prevYearAriaLabel: strings.PrevYear,
nextYearAriaLabel: 'Go to next year', nextYearAriaLabel: strings.NextYear,
closeButtonAriaLabel: 'Close date picker' closeButtonAriaLabel: strings.CloseDate
}; };
/** /**
@ -100,6 +101,17 @@ export class EventRecurrenceInfoWeekly extends React.Component<IEventRecurrenceI
this.applyRecurrence(); this.applyRecurrence();
} }
/**
*
*
* @private
* @param date
* @memberof EventRecurrenceInfoDaily
*/
private formatDate(date: Date): string {
return toLocaleShortDateString(date);
}
/** /**
* *
* *
@ -407,6 +419,7 @@ export class EventRecurrenceInfoWeekly extends React.Component<IEventRecurrenceI
label={strings.StartDateLabel} label={strings.StartDateLabel}
value={this.state.startDate} value={this.state.startDate}
onSelectDate={this.onStartDateChange} onSelectDate={this.onStartDateChange}
formatDate={this.formatDate}
/> />
</div> </div>
@ -433,6 +446,7 @@ export class EventRecurrenceInfoWeekly extends React.Component<IEventRecurrenceI
ariaLabel={strings.StartDatePlaceHolder} ariaLabel={strings.StartDatePlaceHolder}
style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }} style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }}
onSelectDate={this.onEndDateChange} onSelectDate={this.onEndDateChange}
formatDate={this.formatDate}
value={this.state.endDate} value={this.state.endDate}
disabled={this.state.disableEndDate} disabled={this.state.disableEndDate}
/> />

View File

@ -15,7 +15,7 @@ import {
MaskedTextField MaskedTextField
} from 'office-ui-fabric-react'; } from 'office-ui-fabric-react';
import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker'; import { DatePicker, DayOfWeek, IDatePickerStrings } from 'office-ui-fabric-react/lib/DatePicker';
import { toLocaleShortDateString } from '../../utils/dateUtils';
import spservices from '../../services/spservices'; import spservices from '../../services/spservices';
const DayPickerStrings: IDatePickerStrings = { const DayPickerStrings: IDatePickerStrings = {
@ -109,6 +109,16 @@ export class EventRecurrenceInfoYearly extends React.Component<IEventRecurrenceI
this.applyRecurrence(); this.applyRecurrence();
} }
/**
*
* @private
* @param date
* @memberof EventRecurrenceInfoDaily
*/
private formatDate(date: Date): string {
return toLocaleShortDateString(date);
}
/** /**
* *
* *
@ -561,7 +571,7 @@ export class EventRecurrenceInfoYearly extends React.Component<IEventRecurrenceI
</div> </div>
<div style={{ paddingTop: '22px' }}> <div style={{ paddingTop: '22px' }}>
<Label>Date Range</Label> <Label>{ strings.dateRangeLabel }</Label>
<div style={{ display: 'inline-block', verticalAlign: 'top', paddingRight: '35px', paddingTop: '10px' }}> <div style={{ display: 'inline-block', verticalAlign: 'top', paddingRight: '35px', paddingTop: '10px' }}>
<DatePicker <DatePicker
@ -572,6 +582,7 @@ export class EventRecurrenceInfoYearly extends React.Component<IEventRecurrenceI
label={strings.StartDateLabel} label={strings.StartDateLabel}
value={this.state.startDate} value={this.state.startDate}
onSelectDate={this.onStartDateChange} onSelectDate={this.onStartDateChange}
formatDate={this.formatDate}
/> />
</div> </div>
@ -598,6 +609,7 @@ export class EventRecurrenceInfoYearly extends React.Component<IEventRecurrenceI
ariaLabel={strings.StartDatePlaceHolder} ariaLabel={strings.StartDatePlaceHolder}
style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }} style={{ display: 'inline-block', verticalAlign: 'top', paddingLeft: '22px', }}
onSelectDate={this.onEndDateChange} onSelectDate={this.onEndDateChange}
formatDate={this.formatDate}
value={this.state.endDate} value={this.state.endDate}
disabled={this.state.disableEndDate} disabled={this.state.disableEndDate}
/> />

View File

@ -0,0 +1,9 @@
import * as moment from 'moment';
export function toLocaleLongDateString(date: Date) {
return moment(date).format('LL');
}
export function toLocaleShortDateString(date: Date) {
return moment(date).format('ll');
}

View File

@ -62,23 +62,23 @@ define([], function () {
Tuesday: "Tuesday", Tuesday: "Tuesday",
Monday: "Monday", Monday: "Monday",
Sunday: "Sunday", Sunday: "Sunday",
Jan:'Jan', Jan:"Jan",
Feb:'Feb', Feb:"Feb",
Mar:'Mar', Mar:"Mar",
Apr:'Apr', Apr:"Apr",
May:'May', May:"May",
Jun:'Jun', Jun:"Jun",
Jul:'Jul', Jul:"Jul",
Aug:'Aug', Aug:"Aug",
Sep:'Sep', Sep:"Sep",
Oct:'Oct', Oct:"Oct",
Nov:'Nov', Nov:"Nov",
Dez:'Dez', Dez:"Dez",
December: "December", December: "December",
November: " 'November'", November: "November",
October: "October", October: "October",
September: "September", September: "September",
August: " 'August'", August: "August",
July: "July", July: "July",
June: "June", June: "June",
May: "May", May: "May",
@ -100,17 +100,31 @@ define([], function () {
EventTitleErrorMessage: "Event Title is required.", EventTitleErrorMessage: "Event Title is required.",
EventTitleLabel: "Event title", EventTitleLabel: "Event title",
EventPanelTitle: "Edit/Add Event", EventPanelTitle: "Edit/Add Event",
"PropertyPaneDescription": "Calendar", PropertyPaneDescription: "Calendar",
"BasicGroupName": "Properties", BasicGroupName: "Properties",
SiteUrlFieldLabel: 'Site Url', SiteUrlFieldLabel: "Site Url",
ListFieldLabel: 'Calendar List name', ListFieldLabel: "Calendar List name",
weekLabel: 'Week', weekLabel: "Week",
dayLable: 'Day', dayLable: "Day",
agenda: 'Agenda', agenda: "Agenda",
monthLabel: 'Month', monthLabel: "Month",
"todayLabel": 'Today', todayLabel: "Today",
"previousLabel": 'Previous', previousLabel: "Previous",
"nextLabel": "Next", nextLabel: "Next",
"showMore": 'more' showMore: "more",
recurrenceEventLabel: "Recurrence Event",
editRecurrenceSeries: "Edit Recurrence Series",
ifRecurrenceLabel: "Recurrence ?",
onLabel: "On",
offLabel: "Off",
eventDescriptionLabel: "Event Description",
recurrenceInformationLabel: "Recurrence Information",
dailyLabel: "Daily",
weeklyLabel: "Weekly",
monthlyLabel: "Monthly",
yearlyLabel: "Yearly",
patternLabel: "Pattern",
dateRangeLabel: "Date Range",
occurrencesLabel: "occurrences"
} }
}); });

View File

@ -47,9 +47,9 @@ declare interface ICalendarWebPartStrings {
NextMonth: string; NextMonth: string;
PrevMonth: string; PrevMonth: string;
GoToDay: string; GoToDay: string;
ShortDay_Saunday: string; ShortDay_Sunday: string;
ShortDay_Friday: string; ShortDay_Friday: string;
ShortDay_Tursday: string; ShortDay_Thursday: string;
ShortDay_W: string; ShortDay_W: string;
ShortDay_T: string; ShortDay_T: string;
ShortDay_M: string; ShortDay_M: string;
@ -112,6 +112,21 @@ declare interface ICalendarWebPartStrings {
previousLabel: string; previousLabel: string;
nextLabel: string; nextLabel: string;
showMore: string; showMore: string;
recurrenceEventLabel: string;
editRecurrenceSeries: string;
ifRecurrenceLabel: string;
onLabel: string;
offLabel: string;
eventDescriptionLabel: string;
recurrenceInformationLabel: string;
dailyLabel: string;
weeklyLabel: string;
monthlyLabel: string;
yearlyLabel: string;
patternLabel: string;
dateRangeLabel: string;
occurrencesLabel: string;
} }
declare module 'CalendarWebPartStrings' { declare module 'CalendarWebPartStrings' {

View File

@ -1,7 +1,7 @@
define([], function () { define([], function () {
return { return {
WeeksOnLabel: "veckor på", WeeksOnLabel: "vecka på",
PaternLabel: "Mönster", PaternLabel: "Schema",
OcurrencesLabel: "Tillfällen", OcurrencesLabel: "Tillfällen",
dateRangeLabel: "Datumintervall", dateRangeLabel: "Datumintervall",
weekEndDay: "Helgdag", weekEndDay: "Helgdag",
@ -17,8 +17,8 @@ define([], function () {
AllowedValues1to12Label: "Tillåtna värder 1 till 12", AllowedValues1to12Label: "Tillåtna värder 1 till 12",
noEndDate: "inget slutdatum", noEndDate: "inget slutdatum",
everyweekdays: "alla veckodagar", everyweekdays: "alla veckodagar",
days: "dagar", days: "dag",
every: "varje", every: "var",
EndByLabel: "slutar den", EndByLabel: "slutar den",
EndAfterLabel: "slutar efter", EndAfterLabel: "slutar efter",
HttpErrorMessage: "Fel vid inläsning av kalenderhändelser:", HttpErrorMessage: "Fel vid inläsning av kalenderhändelser:",
@ -62,23 +62,23 @@ define([], function () {
Tuesday: "Tisdag", Tuesday: "Tisdag",
Monday: "Måndag", Monday: "Måndag",
Sunday: "Söndag", Sunday: "Söndag",
Jan:'Jan', Jan:"Jan",
Feb:'Feb', Feb:"Feb",
Mar:'Mar', Mar:"Mar",
Apr:'Apr', Apr:"Apr",
May:'Maj', May:"Maj",
Jun:'Jun', Jun:"Jun",
Jul:'Jul', Jul:"Jul",
Aug:'Aug', Aug:"Aug",
Sep:'Sep', Sep:"Sep",
Oct:'Okt', Oct:"Okt",
Nov:'Nov', Nov:"Nov",
Dez:'Dec', Dez:"Dec",
December: "December", December: "December",
November: " 'November'", November: "November",
October: "Oktober", October: "Oktober",
September: "September", September: "September",
August: " 'Augusti'", August: "Augusti",
July: "Juli", July: "Juli",
June: "Juni", June: "Juni",
May: "Maj", May: "Maj",
@ -100,18 +100,32 @@ define([], function () {
EventTitleErrorMessage: "Titel på händelsen är obligatoriskt.", EventTitleErrorMessage: "Titel på händelsen är obligatoriskt.",
EventTitleLabel: "Titel", EventTitleLabel: "Titel",
EventPanelTitle: "Redigera/Lägg till händelse", EventPanelTitle: "Redigera/Lägg till händelse",
"PropertyPaneDescription": "Kalender", PropertyPaneDescription: "Kalender",
"BasicGroupName": "Egenskaper", BasicGroupName: "Egenskaper",
SiteUrlFieldLabel: 'Site Url', SiteUrlFieldLabel: "Site Url",
ListFieldLabel: 'Kalenderlista', ListFieldLabel: "Kalenderlista",
weekLabel: 'Vecka', weekLabel: "Vecka",
dayLable: 'Dag', dayLable: "Dag",
agenda: 'Agenda', agenda: "Agenda",
monthLabel: 'Månad', monthLabel: "Månad",
"todayLabel": 'Idag', todayLabel: "Idag",
"previousLabel": 'Föregående', previousLabel: "Föregående",
"nextLabel": "Nästa", nextLabel: "Nästa",
"showMore": 'mer' showMore: "mer",
recurrenceEventLabel: "Återkommande händelse",
editRecurrenceSeries: "Redigera återkommande händelse",
ifRecurrenceLabel: "Återkommande ?",
onLabel: "På",
offLabel: "Av",
eventDescriptionLabel: "Beskrivning",
recurrenceInformationLabel: "Intervall",
dailyLabel: "Dagligen",
weeklyLabel: "Veckovis",
monthlyLabel: "Månatligen",
yearlyLabel: "Årligen",
patternLabel: "Schema",
dateRangeLabel: "Datumintervall",
occurrencesLabel: "tillfällen"
} }
}); });