Nepali Date picker for Android - Jetpack Compose

Kiran Gyawali
2 min readJul 2, 2022

--

Nepali date picker library demo in English and Nepali language

If you are reading this, then you need a Nepali date picker, which may or may not be in Android. If you are looking for some ideas to build your own or you want to use the one I published. The important thing is you are here :)

I recently did a migration of the Date picker converter from old XML and Java to new Jetpack compose and Kotlin, which is now published on GitHub.

Using Date picker

Adding library as your dependency

Step 1: add jitpack dependency in your project-level build.gradle

allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}

Step 2: in your app module build.gradle add date picker library as dependency

dependencies {
implementation 'com.github.keyrunHORNET:composeNepaliDatePicker:$version'
}

After adding those dependencies, sync your project. You are now ready to use that picker.

var showDialog by remember { mutableStateOf(false) }

if (showDialog) {
NepaliDatePicker(
onDateSelected = { date ->
// selected date
},
onDismiss = {
showDialog = false
}
)
}

The date picker can accept minDate and maxDate as an argument to limit the date range. Disabling and highlighting dates within the range of minDate and maxDate are also supported. As before date converter is also available for converting date from AD to BS and vice-versa.

--

--

Kiran Gyawali

Have you tried to look at some thing, with an unconventional perspective? I try to, mostly!