{"id":18782886,"url":"https://github.com/rescript-react-native/datetimepicker","last_synced_at":"2025-08-07T02:14:27.432Z","repository":{"id":40712324,"uuid":"213093695","full_name":"rescript-react-native/datetimepicker","owner":"rescript-react-native","description":"ReScript bindings for @react-native-community/datetimepicker","archived":false,"fork":false,"pushed_at":"2023-02-09T07:14:02.000Z","size":900,"stargazers_count":6,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-24T06:59:57.442Z","etag":null,"topics":["date","datetime","datetimepicker","picker","react","react-native","rescript","rescript-react","rescript-react-native"],"latest_commit_sha":null,"homepage":"","language":"ReScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rescript-react-native.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-10-06T01:29:24.000Z","updated_at":"2024-02-20T00:53:56.000Z","dependencies_parsed_at":"2023-07-18T16:02:36.837Z","dependency_job_id":null,"html_url":"https://github.com/rescript-react-native/datetimepicker","commit_stats":{"total_commits":29,"total_committers":4,"mean_commits":7.25,"dds":0.1724137931034483,"last_synced_commit":"11863d0457d4788afcde4be2ff176e9adcbe99b1"},"previous_names":["reason-react-native/datetimepicker"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rescript-react-native/datetimepicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fdatetimepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fdatetimepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fdatetimepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fdatetimepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rescript-react-native","download_url":"https://codeload.github.com/rescript-react-native/datetimepicker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fdatetimepicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269185726,"owners_count":24374634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","datetime","datetimepicker","picker","react","react-native","rescript","rescript-react","rescript-react-native"],"created_at":"2024-11-07T20:37:23.200Z","updated_at":"2025-08-07T02:14:27.413Z","avatar_url":"https://github.com/rescript-react-native.png","language":"ReScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@rescript-react-native/datetimepicker`\n\n[![Build Status](https://github.com/rescript-react-native/datetimepicker/workflows/Build/badge.svg)](https://github.com/rescript-react-native/datetimepicker/actions)\n[![Version](https://img.shields.io/npm/v/@rescript-react-native/datetimepicker.svg)](https://www.npmjs.com/@rescript-react-native/datetimepicker)\n[![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f\u0026label=ReScript%20Forum\u0026server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/)\n\n[ReScript](https://rescript-lang.org) bindings for\n[`@react-native-community/datetimepicker`](https://github.com/react-native-community/react-native-datetimepicker).\n\nExposed as the `ReactNativeDateTimePicker` module.\n\nVersion x.y.z of `@rescript-react-native/datetimepicker` is intended to be\ncompatible with version x.y.z of `@react-native-community/datetimepicker`.\n\n## Installation\n\nWhen\n[`@react-native-community/datetimepicker`](https://github.com/react-native-community/datetimepicker)\nis properly installed \u0026 configured by following their installation instructions,\nyou can install the bindings:\n\n```console\nnpm install @rescript-react-native/datetimepicker\n# or\nyarn add @rescript-react-native/datetimepicker\n```\n\n`@rescript-react-native/datetimepicker` should be added to `bs-dependencies` in\nyour `bsconfig.json`. For example,\n\n```diff\n{\n  //...\n  \"bs-dependencies\": [\n    \"@rescript/react\",\n    \"rescript-react-native\",\n    // ...\n+    \"@rescript-react-native/datetimepicker\"\n  ],\n  //...\n}\n```\n\n## Usage\n\n### Types\n\n#### `locale = string`\n\nRefer to\n[documentation](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html)\nfor valid values.\n\n#### `PickerEvent.t`\n\nAssuming `pickerEvent` is `PickerEvent.t`, you can access\n\n```rescript\npickerEvent.nativeEvent.target // =\u003e option(int)\npickerEvent.nativeEvent.timestamp // =\u003e int\n```\n\nNote that `target` is undefined on Android.\n\n### Props\n\nAll props other than `value` are optional.\n\n#### `value: Js.Date.t`\n\n_required_\n\nCurrent value for time and date.\n\n#### `maximumDate: Js.Date.t`\n\nLatest date that can be selected. For example\n`maximumDate = Js.Date.makeWithYMD(2020., 10., 15., ())`. Note that months are\nnumbered from `0`.\n\n#### `minimumDate: Js.Date.t`\n\nEarliest date that can be selected. For example\n`minimumDate = Js.Date.makeWithYMD(2015., 0., 18., ())`. Note that months are\nnumbered from `0`.\n\n#### `` mode: [ | `date | `time | `datetime | `countdown] ``\n\nType of the picker. Note that\n\n- `` `date `` is the default\n- `` `datetime `` and `` `countdown `` are iOS only\n\n#### `` display: [ | `default | `spinner | `calendar | `clock] ``\n\n_Android only_\n\nHow the picker is displayed. Note that\n\n- \\`calendar is only for `` mode=`date ``\n- \\`clock is only for `` mode=`time ``\n\n#### `onChange: (pickerEvent, Js.Date.t) =\u003e unit`\n\n- `pickerEvent` has keys `nativeEvent` on both platforms and also `_type` on\n  Android.\n\n- _Android:_ `_type` key takes value `\"set\"` (when the dialog is closed via\n  \"OK\") or `\"dismissed\"` (when the dialog is closed via \"cancel\").\n\n#### `timeZoneOffsetInMinutes: int`\n\n_iOS only_\n\nAllows changing time zone of the date picker. By default device's time zone is\nused. As an example, set to `60` for GMT+1.\n\n#### `locale: locale`\n\n_iOS only_\n\nAllows changing locale of the component. By default device's locale is used.\n\nRefer to\n[documentation](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html)\nfor valid values.\n\n#### `is24Hour: bool`\n\n_Android only._\n\nAllows changing of the time picker to a 24 hour format. Default is false.\n\n#### `minuteInterval: [ |`\\_1 | `_2 |`\\_3 | `_4 |`\\_5 | `_6 |`\\_10 | `_12 |`\\_15 | `_20 |`\\_30 ]`\n\n_iOS only._\n\nInterval at which minutes can be selected. Polymorphic constructors are rendered\nto string (that is `` `_3 `` becomes `\"3\"`).\n\n---\n\n## Changelog\n\nCheck the [changelog](./CHANGELOG.md) for more information about recent\nreleases.\n\n## Contribute\n\nRead the [contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md) before contributing.\n\n## Code of Conduct\n\nWe want this community to be friendly and respectful to each other. Please read\n[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md) so that you can understand what\nactions will and will not be tolerated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frescript-react-native%2Fdatetimepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frescript-react-native%2Fdatetimepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frescript-react-native%2Fdatetimepicker/lists"}