office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
1 lines • 2.92 kB
JavaScript
define([], function() { return "import * as React from 'react';\nimport { DatePicker } from './DatePicker';\n\nexport interface IDatePickerProps extends React.Props<DatePicker> {\n /**\n * Callback issued when a date is selected\n */\n onSelectDate?: (date: Date) => void;\n\n /**\n * Label for the DatePicker\n */\n label?: string;\n\n /**\n * Whether the DatePicker is a required field or not\n * @defaultvalue false\n */\n isRequired?: boolean;\n\n /**\n * Aria Label for TextField of the DatePicker for screen reader users.\n */\n ariaLabel?: string;\n\n /**\n * Whether the month picker is shown beside the day picker or hidden.\n * @defaultvalue true \n */\n isMonthPickerVisible?: boolean;\n\n /**\n * Whether the DatePicker allows input a date string directly or not\n * @defaultvalue false\n */\n allowTextInput?: boolean;\n\n /**\n * Placeholder text for the DatePicker\n */\n placeholder?: string;\n\n /**\n * Default value of the DatePicker, if any\n */\n value?: Date;\n\n /**\n * Optional method to format the chosen date to a string to display in the DatePicker\n * @defaultvalue date.toString()\n */\n formatDate?: (date: Date) => string;\n\n /**\n * Optional method to parse the text input value to date, it is only useful when allowTextInput is set to true\n * @defaultvalue new Date(Date.parse(dateStr))\n */\n parseDateFromString?: (dateStr: string) => Date;\n\n /**\n * The first day of the week for your locale.\n * @defaultvalue DayOfWeek.Sunday\n */\n firstDayOfWeek?: DayOfWeek;\n\n /**\n * Localized strings to use in the DatePicker\n */\n strings: IDatePickerStrings;\n}\n\nexport enum DayOfWeek {\n Sunday,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday\n}\n\nexport interface IDatePickerStrings {\n /**\n * An array of strings for the full names of months.\n * The array is 0-based, so months[0] should be the full name of January.\n */\n months: string[];\n\n /**\n * An array of strings for the short names of months.\n * The array is 0-based, so shortMonths[0] should be the short name of January.\n */\n shortMonths: string[];\n\n /**\n * An array of strings for the full names of days of the week.\n * The array is 0-based, so days[0] should be the full name of Sunday.\n */\n days: string[];\n\n /**\n * An array of strings for the initials of the days of the week.\n * The array is 0-based, so days[0] should be the initial of Sunday.\n */\n shortDays: string[];\n\n /**\n * String to render for button to direct the user to today's date.\n */\n goToToday: string;\n\n /**\n * Error message to render for TextField if isRequired validation fails.\n */\n isRequiredErrorMessage?: string;\n\n /**\n * Error message to render for TextField if input date string parsing fails.\n */\n invalidInputErrorMessage?: string;\n}\n"; });