Module DatePickerIOS-BsReactNative

let make: date:Js.Date.t => onDateChange:(Js.Date.t => unit) => ?⁠maximumDate:Js.Date.t => ?⁠minimumDate:Js.Date.t => ?⁠mode:[ `date | `datetime | `time ] => ?⁠minuteInterval:int => ?⁠timeZoneOffsetInMinutes:int => ?⁠accessibilityLabel:ReasonReact.reactElement => ?⁠accessible:bool => ?⁠hitSlop:BsReactNative.Types.insets => ?⁠onAccessibilityTap:(unit => unit) => ?⁠onLayout:(BsReactNative.RNEvent.NativeLayoutEvent.t => unit) => ?⁠onMagicTap:(unit => unit) => ?⁠responderHandlers:BsReactNative.Types.touchResponderHandlers => ?⁠pointerEvents:BsReactNative.Types.pointerEvents => ?⁠removeClippedSubviews:bool => ?⁠style:BsReactNative.Style.t => ?⁠testID:string => ?⁠accessibilityComponentType:BsReactNative.Types.accessibilityComponentType => ?⁠accessibilityLiveRegion:BsReactNative.Types.accessibilityLiveRegion => ?⁠collapsable:bool => ?⁠importantForAccessibility:BsReactNative.Types.importantForAccessibility => ?⁠needsOffscreenAlphaCompositing:bool => ?⁠renderToHardwareTextureAndroid:bool => ?⁠accessibilityTraits:list(BsReactNative.Types.accessibilityTrait) => ?⁠accessibilityRole:BsReactNative.Types.accessibilityRole => ?⁠accessibilityStates:list(BsReactNative.Types.accessibilityState) => ?⁠accessibilityHint:string => ?⁠accessibilityIgnoresInvertColors:bool => ?⁠accessibilityViewIsModal:bool => ?⁠shouldRasterizeIOS:bool => array(ReasonReact.reactElement) => ReasonReact.component(ReasonReact.stateless, ReasonReact.noRetainedProps, unit);

Date/time picker for ios in React Native DOC, requires date and onDateChange props to be rendered:

Example

default

let component = ReasonReact.statelessComponent("MyComponent");

let make = _children => {
  ...component,
  render: _self =>
    <DatePickerIOS
      date=(Js.Date.fromString("February 12, 1990 17:40"))
      onDateChange=(date => Js.log(date))
    />,
};

Here you can find BuckleScript's Js.Date API

The JavaScript Date API might also be a useful resource.

mode

let component = ReasonReact.statelessComponent("MyComponent");

let make = _children => {
  ...component,
  render: _self =>
    <DatePickerIOS
      date=(Js.Date.fromString("February 12, 1990 17:40"))
      onDateChange=(date => Js.log(date))
      mode=`date
    />,
};

Props

date

~date: Js.Date.t

onDateChange

~onDateChange: Js.Date.t => unit

maximumDate

maximumDate: Js.Date.t=?

minimumDate

~minimumDate: Js.Date.t=?

mode

~mode: [
  | `date
  | `datetime
  | `time
]=?

minuteInterval

~minuteInterval: int=?

timeZoneOffsetInMinutes

~timeZoneOffsetInMinutes: int=?

accessibilityLabel

~accessibilityLabel: ReasonReact.reactElement=?

accessible

~accessible: bool=?

hitSlop

~hitSlop: Types.insets=?
reference:

Types.rei

type insets = {
  .
  "left": int,
  "right": int,
  "top": int,
  "bottom": int,
};

onAccessibilityTap

~onAccessibilityTap: unit => unit=?

onLayout

~onLayout: RNEvent.NativeLayoutEvent.t => unit=?

onMagicTap

~onMagicTap: unit => unit=?

responderHandlers

~responderHandlers: Types.touchResponderHandlers=?
reference:

Types.rei

type insets = {
  .
  "left": int,
  "right": int,
  "top": int,
  "bottom": int,
};

RNEvent.rei

module NativeEvent: {
  type t;
  let changedTouches: t => array(Js.t({..}));
  let identifier: t => int;
  let locationX: t => float;
  let locationY: t => float;
  let pageX: t => float;
  let pageY: t => float;
  let target: t => Js.t({..});
  let touches: t => array(Js.t({..}));
  let timestamp: t => int;
  let data: t => string;
};

pointerEvents

~pointerEvents: [
  | `auto
  | `none
  | `boxNone
  | `boxOnly
]=?

style

~style: Style.t=?

testID

~testID: string=?

accessibilityComponentType

~accessibilityComponentType: [
  | `none
  | `button
  | `radiobutton_checked
  | `radiobutton_unchecked
]=?

accessibilityLiveRegion

~accessibilityLiveRegion: [
  | `none
  | `polite
  | `assertive
]=?

collapsable

~collapsable: bool=?

importantForAccessibility

~importantForAccessibility: [
  | `auto
  | `yes
  | `no
  | `noHideDescendants
]=?

needsOffscreenAlphaCompositing

~needsOffscreenAlphaCompositing: bool=?

renderToHardwareTextureAndroid

~renderToHardwareTextureAndroid: bool=?

accessibilityTraits

~accessibilityTraits:
  list(
    [
      | `adjustable
      | `allowsDirectInteraction
      | `button
      | `disabled
      | `frequentUpdates
      | `header
      | `image
      | `key
      | `link
      | `none
      | `pageTurn
      | `plays
      | `search
      | `selected
      | `startsMedia
      | `summary
      | `text
    ],
  )=?

accessibilityViewIsModal

~accessibilityViewIsModal: bool=?

accessibilityViewIsModal

~shouldRasterizeIOS: bool=?