Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Brazesh Tamang committed Sep 8, 2022
1 parent 07e40bd commit 3d0b0b5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## compose-nepcal (Nepali date picker and converter for compose)

Current version **1.0.0-beta01**
Current version **1.0.0-beta02**

This is a android compose ui library to nepali (BS) calendar date picker.
This is a android compose-ui date picker library for nepali (BS) calendar.

#### Requirements

1. Compose 1.1.1 (kotlin 1.6.10)
1. Compose 1.2.0+ (kotlin 1.7.0+)
2. Compose Material 1.1.1
3. Java8 Date Time Api's (available through coreLibraryDesugaring)

Expand All @@ -17,13 +17,18 @@ more about desugaring at [developer.android.com](https://developer.android.com/s

```groovy
compileOptions {
coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8}
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"}
jvmTarget = "1.8"
}
dependencies {
//... coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' //...}
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
```

#### Step 2: Add dependency compose 1.1.1
Expand All @@ -35,10 +40,10 @@ following maven dependency in your app gradle file.
implementation 'io.github.aagitoex:compose-nepcal:0.0.1-alpha01'
```

### Step 2: Add dependency compose 1.2.0+
#### Step 2: Add dependency compose 1.2.0+

```groovy
implementation 'io.github.aagitoex:compose-nepcal:1.0.0-beta01'
implementation 'io.github.aagitoex:compose-nepcal:1.0.0-beta02'
```

#### Step 3: Display date picker dialog
Expand All @@ -47,8 +52,19 @@ The library provides a date picker dialog api that is similar to `Dialog` in com

```kotlin
Surface() {
var showDateDialog by remember { mutableStateOf(false) } if (showDateDialog) { CalendarDialog( selectedDate = LocalDate.now()!!, onDismissRequest = { showDateDialog = false }, onDateChange = { localDate: LocalDate -> }
) }}
var showDateDialog by remember {
mutableStateOf(false)
}
if (showDateDialog) {
CalendarDialog(
selectedDate = LocalDate.now()!!,
onDismissRequest = { showDateDialog = false },
onDateChange = {
localDate: LocalDate ->
}
)
}
}
```

This project uses [nepdate](https://github.com/AagitoEx/nepdate) java lib and so all **date conversion**
Expand Down
2 changes: 1 addition & 1 deletion datepicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
ext {
// Provide your own coordinates here
PUBLISH_GROUP_ID = 'io.github.aagitoex'
PUBLISH_VERSION = '1.0.0-beta01'
PUBLISH_VERSION = '1.0.0-beta02'
PUBLISH_ARTIFACT_ID = 'compose-nepcal'
}

Expand Down

0 comments on commit 3d0b0b5

Please # to comment.