{"id":19237716,"url":"https://github.com/lanarsinc/compose-date-text-field","last_synced_at":"2025-04-21T06:31:32.330Z","repository":{"id":46538834,"uuid":"411625046","full_name":"LanarsInc/compose-date-text-field","owner":"LanarsInc","description":"Date text field with on the fly validation","archived":false,"fork":false,"pushed_at":"2024-02-13T10:34:07.000Z","size":12496,"stargazers_count":25,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-01T10:42:04.121Z","etag":null,"topics":["android","compose","dateinput","datetime","input"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LanarsInc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-29T10:14:58.000Z","updated_at":"2025-02-13T13:58:58.000Z","dependencies_parsed_at":"2024-11-09T16:39:57.601Z","dependency_job_id":null,"html_url":"https://github.com/LanarsInc/compose-date-text-field","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LanarsInc%2Fcompose-date-text-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LanarsInc%2Fcompose-date-text-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LanarsInc%2Fcompose-date-text-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LanarsInc%2Fcompose-date-text-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LanarsInc","download_url":"https://codeload.github.com/LanarsInc/compose-date-text-field/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250008195,"owners_count":21359945,"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","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":["android","compose","dateinput","datetime","input"],"created_at":"2024-11-09T16:27:57.386Z","updated_at":"2025-04-21T06:31:32.324Z","avatar_url":"https://github.com/LanarsInc.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DateTextField for Jetpack Compose\n\nDate text field with on the fly validation built with Jetpack Compose.\n\u003cp\u003e\nThe input is validated while the user is typing it, so it is impossible to enter an incorrect value.\n\nMade in [LANARS](https://lanars.com/).\n\n---\n\n# Download\n```groovy\nrepositories {\n    ...\n    maven { url 'https://jitpack.io' }\n}\n```\n```groovy\ndependencies {\n    implementation 'com.github.LanarsInc:compose-date-text-field:{latest version}'\n}\n```\n\n# Preview\nUser can only enter existing dates\n\n\u003cimg src=\"https://raw.githubusercontent.com/LanarsInc/compose-date-text-field/develop/media/datetextfield-existing-dates.gif\" width=\"300\"\u003e\n  \nUser can only enter dates that are in the allowed range\n  \n\u003cimg src=\"https://raw.githubusercontent.com/LanarsInc/compose-date-text-field/develop/media/datetextfield-values-in-range.gif\" width=\"300\"\u003e\n  \nInput is being validated even though some fields are not complete\n\n\u003cimg src=\"https://raw.githubusercontent.com/LanarsInc/compose-date-text-field/develop/media/datetextfield-non-complete-fields.gif\" width=\"300\"\u003e\n\n# Usage\n\nBasic implementation\n```kotlin\nDateTextField(\n    onValueChanged = {}\n)\n```\nYou can set the exact date boundaries or leave it by default, from 1/1/1900 to 12/31/2100. Date format by default will be MM/DD/YYYY\n```kotlin\nDateTextField(\n    // Detect focus changes\n    modifier = Modifier.onFocusChanged { Log.d(\"DateInput\", it.toString()) },\n    // Set the desired date format\n    format = Format.MMDDYYYY,\n    // Set min and max date\n    minDate = LocalDate.now().minusYears(1),\n    maxDate = LocalDate.now().plusYears(1),\n    // Get notified about value changes\n    onValueChanged = { Log.d(\"DateInput\", it.toString()) },\n    // Preset date value\n    initialValue = LocalDate.now(),\n    // Apply text style to input text\n    textStyle = TextStyle(fontSize = 25.sp, color = Color.Black),\n    // Apply text style to hint\n    hintTextStyle = TextStyle(fontSize = 25.sp, color = Color.Gray),\n    // Apply style to cursor\n    cursorBrush = SolidColor(Color.Red),\n    // Set custom delimiter\n    delimiter = '.',\n    // Set horizontal delimiter margin\n    delimiterSpacing = 4.dp,\n    // Set field to be readonly\n    readOnly = true\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanarsinc%2Fcompose-date-text-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flanarsinc%2Fcompose-date-text-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanarsinc%2Fcompose-date-text-field/lists"}