How to use the @instructure/ui-i18n.I18nPropTypes.iso8601 function in @instructure/ui-i18n

To help you get started, we’ve selected a few @instructure/ui-i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instructure / instructure-ui / packages / ui-forms / src / TimeInput / index.js View on Github external
*
     * See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the list
     * of possible options.
     *
     * This property can also be set via a context property and if both are set then the component property takes
     * precedence over the context property.
     *
     * The web browser's timezone will be used if no value is set via a component property or a context
     * property.
     */
    timezone: PropTypes.string,
    /**
     * An ISO 8601 formatted date string representing the current selected value
     * (must be accompanied by an onChange prop).
     */
    value: controllable(I18nPropTypes.iso8601),
    /**
     * Whether or not to disable the select
     */
    disabled: PropTypes.bool,
    /**
     * Works just like disabled but keeps the same styles as if it were active
     */
    readOnly: PropTypes.bool
  }
  /* eslint-enable react/require-default-props */

  static defaultProps = {
    defaultToFirstOption: false,
    format: 'LT',
    step: 30
  }
github instructure / instructure-ui / packages / ui-forms / src / TimeInput / index.js View on Github external
---
**/
@testable()
@themeable(theme, styles)
@deprecated('7.0.0', null, 'Use @instructure/ui-select instead')
class TimeInput extends Component {
  /* eslint-disable react/require-default-props */
  static propTypes = {
    /**
     * Whether to default to the first option when `defaultValue` hasn't been specified.
     */
    defaultToFirstOption: PropTypes.bool,
    /**
     * An ISO 8601 formatted date string to use if `value` isn't provided.
     */
    defaultValue: I18nPropTypes.iso8601,
    /**
     * The format to use when displaying the possible and currently selected options.
     *
     * See [moment.js formats](https://momentjs.com/docs/#/displaying/format/) for the list of available formats.
     */
    format: PropTypes.string,
    /**
     * The label associated with the underlying [TextInput](#TextInput).
     */
    label: PropTypes.node.isRequired,
    /**
     * A standard language identifier.
     *
     * See [moment.js i18n](https://momentjs.com/docs/#/i18n/) for more details.
     *
     * This property can also be set via a context property and if both are set then the component property takes
github instructure / instructure-ui / packages / ui-calendar / src / Calendar / Day / index.js View on Github external
id: Calendar.Day
---
**/
@testable()
@themeable(theme, styles)
class Day extends Component {
  static propTypes = {
    /**
    * The rendered representation of the corresponding date.
    */
    children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
    /**
    * An ISO 8601 formatted string representing the date corresponding to
    * this ``
    */
    date: I18nPropTypes.iso8601.isRequired,
    /**
    * Accessible label to provide more context for the date to assistive
    * technologies. This should consist of more than just a numerical date value.
    * It should also include the month and the year. Ex. instead of just `1`,
    * provide `1 August 2019`.
    */
    label: PropTypes.string.isRequired,
    /**
    * Is the `` disabled
    */
    interaction: PropTypes.oneOf(['enabled', 'disabled']),
    /**
    * Is the `` selected
    */
    isSelected: PropTypes.bool,
    /**
github instructure / instructure-ui / packages / ui-forms / src / DateInput / DatePicker / index.js View on Github external
**/
    previousLabel: PropTypes.string.isRequired,
    /**
      The label to put on the next month button of the calendar.
    **/
    nextLabel: PropTypes.string.isRequired,

    /**
      An ISO 8601 formatted string. The selected value on initial render.
    **/
    defaultSelectedValue: I18nPropTypes.iso8601,
    /**
      An ISO 8601 formatted string. Must be accompanied by an onSelectedChange property.
      Defaults to today's date.
    **/
    selectedValue: controllable(I18nPropTypes.iso8601,
      'onSelectedChange', 'defaultSelectedValue'),

    /**
      An ISO 8601 formatted string. The rendered value on initial render.
    **/
    defaultRenderedValue: I18nPropTypes.iso8601,

    /**
      An ISO 8601 formatted string. Must be accompanied by an onRenderedChange property.
      Defaults to today's date.
    **/
    renderedValue: controllable(I18nPropTypes.iso8601,
      'onRenderedChange', 'defaultRenderedValue'),

    /**
      An ISO 8601 formatted string. Defaults to the current date. DatePicker doesn't
github instructure / instructure-ui / packages / ui-forms / src / DateInput / DatePicker / index.js View on Github external
An ISO 8601 formatted string. The rendered value on initial render.
    **/
    defaultRenderedValue: I18nPropTypes.iso8601,

    /**
      An ISO 8601 formatted string. Must be accompanied by an onRenderedChange property.
      Defaults to today's date.
    **/
    renderedValue: controllable(I18nPropTypes.iso8601,
      'onRenderedChange', 'defaultRenderedValue'),

    /**
      An ISO 8601 formatted string. Defaults to the current date. DatePicker doesn't
      attempt to change this value. Defaults to today's date.
    **/
    todayValue: I18nPropTypes.iso8601,

    /**
      A standard language id
    **/
    locale: PropTypes.string,
    /**
      A timezone identifier in the format: Area/Location
    **/
    timezone: PropTypes.string,

    /**
      Called with the triggering event followed by an ISO 8601 formatted string.
    **/
    onSelectedChange: PropTypes.func,
    /**
      Called with the triggering event followed by an ISO 8601 formatted string.
github instructure / instructure-ui / packages / ui-forms / src / DateInput / DatePicker / index.js View on Github external
An ISO 8601 formatted string. Must be accompanied by an onSelectedChange property.
      Defaults to today's date.
    **/
    selectedValue: controllable(I18nPropTypes.iso8601,
      'onSelectedChange', 'defaultSelectedValue'),

    /**
      An ISO 8601 formatted string. The rendered value on initial render.
    **/
    defaultRenderedValue: I18nPropTypes.iso8601,

    /**
      An ISO 8601 formatted string. Must be accompanied by an onRenderedChange property.
      Defaults to today's date.
    **/
    renderedValue: controllable(I18nPropTypes.iso8601,
      'onRenderedChange', 'defaultRenderedValue'),

    /**
      An ISO 8601 formatted string. Defaults to the current date. DatePicker doesn't
      attempt to change this value. Defaults to today's date.
    **/
    todayValue: I18nPropTypes.iso8601,

    /**
      A standard language id
    **/
    locale: PropTypes.string,
    /**
      A timezone identifier in the format: Area/Location
    **/
    timezone: PropTypes.string,
github instructure / instructure-ui / packages / ui-forms / src / DateTimeInput / index.js View on Github external
* This format of the composite date-time when displayed in messages.
    * Valid formats are compatible with
    * [moment.js formats](https://momentjs.com/docs/#/displaying/format/),
    * including localized formats.
    **/
    messageFormat: PropTypes.string,
    /**
    * Vertically stacked, horizontally arranged in 2 columns, or inline.
    * See [FormFieldGroup](#FormFieldGroup) for details.
    **/
    layout: PropTypes.oneOf(['stacked', 'columns', 'inline']),
    /**
    * An ISO 8601 formatted date string representing the current date-time
    * (must be accompanied by an onChange prop).
    **/
    value: controllable(I18nPropTypes.iso8601, 'onChange'),
    /**
    * An ISO 8601 formatted date string to use if `value` isn't provided.
    **/
    defaultValue: I18nPropTypes.iso8601,
    required: PropTypes.bool,
    /**
     * Whether or not to disable the inputs
     */
    disabled: PropTypes.bool,
    /**
     * Works just like disabled but keeps the same styles as if it were active
     */
    readOnly: PropTypes.bool,
    /**
    * Called when the date-time value has changed.
    * The passed in parameters are
github instructure / instructure-ui / packages / ui-forms / src / DateInput / DatePicker / index.js View on Github external
/**
      An ISO 8601 formatted string. The selected value on initial render.
    **/
    defaultSelectedValue: I18nPropTypes.iso8601,
    /**
      An ISO 8601 formatted string. Must be accompanied by an onSelectedChange property.
      Defaults to today's date.
    **/
    selectedValue: controllable(I18nPropTypes.iso8601,
      'onSelectedChange', 'defaultSelectedValue'),

    /**
      An ISO 8601 formatted string. The rendered value on initial render.
    **/
    defaultRenderedValue: I18nPropTypes.iso8601,

    /**
      An ISO 8601 formatted string. Must be accompanied by an onRenderedChange property.
      Defaults to today's date.
    **/
    renderedValue: controllable(I18nPropTypes.iso8601,
      'onRenderedChange', 'defaultRenderedValue'),

    /**
      An ISO 8601 formatted string. Defaults to the current date. DatePicker doesn't
      attempt to change this value. Defaults to today's date.
    **/
    todayValue: I18nPropTypes.iso8601,

    /**
      A standard language id
github instructure / instructure-ui / packages / ui-forms / src / DateInput / index.js View on Github external
*/
    messages: PropTypes.arrayOf(FormPropTypes.message),
    /**
      A standard language id
    **/
    locale: PropTypes.string,
    /**
      A timezone identifier in the format: Area/Location
    **/
    timezone: PropTypes.string,

    /**
      An ISO 8601 formatted string. The initial date value to display on render.
      It should only be used when using this component as an uncontrolled input.
    **/
    defaultDateValue: I18nPropTypes.iso8601,

    /**
      Called when the date value of the input has changed.
      The parameters are the triggering event, new date value in ISO 8601 format,
      the raw user input, if the conversion from raw to a date was successful, and
      if the selected date is disabled.
    **/
    onDateChange: PropTypes.func,

    /**
    * the selected value (must be accompanied by an `onDateChange` prop)
    */
    dateValue: controllable(I18nPropTypes.iso8601, 'onDateChange', 'defaultDateValue'),

    /**
      Whether to display validation feedback while typing.
github instructure / instructure-ui / packages / ui-forms / src / DateTimeInput / index.js View on Github external
**/
    messageFormat: PropTypes.string,
    /**
    * Vertically stacked, horizontally arranged in 2 columns, or inline.
    * See [FormFieldGroup](#FormFieldGroup) for details.
    **/
    layout: PropTypes.oneOf(['stacked', 'columns', 'inline']),
    /**
    * An ISO 8601 formatted date string representing the current date-time
    * (must be accompanied by an onChange prop).
    **/
    value: controllable(I18nPropTypes.iso8601, 'onChange'),
    /**
    * An ISO 8601 formatted date string to use if `value` isn't provided.
    **/
    defaultValue: I18nPropTypes.iso8601,
    required: PropTypes.bool,
    /**
     * Whether or not to disable the inputs
     */
    disabled: PropTypes.bool,
    /**
     * Works just like disabled but keeps the same styles as if it were active
     */
    readOnly: PropTypes.bool,
    /**
    * Called when the date-time value has changed.
    * The passed in parameters are
    * *event*: the triggering event (which may be from the underlying
    * `DateInput` or `TimeInput`), *isoValue*: the new date value in ISO 8601 format.
    **/
    onChange: PropTypes.func,