Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wont work #5

Open
fluttyCat opened this issue Sep 11, 2024 · 3 comments
Open

wont work #5

fluttyCat opened this issue Sep 11, 2024 · 3 comments

Comments

@fluttyCat
Copy link

وقتی لایبرری رو اد میکنم اصلا و سینک میکنم اصلا سینک نمیشه
و هیچی رو نمیشناسه

@razaghimahdi
Copy link
Owner

سلام
maven { url 'https://jitpack.io' }
این رو اضافه کنید

@fluttyCat
Copy link
Author

fluttyCat commented Sep 16, 2024 via email

@razaghimahdi
Copy link
Owner

@fluttyCat سلام
اول تابع updateMinYear رو صدا بزن و مقدار دهی کن بعد تابع updateDate رو صدا بزن، مثلا:

val rememberPersianDialogDatePicker = rememberDialogDatePicker()
val rememberPersianBottomSheetDatePickerController = rememberDialogDatePicker()

// 3 ways to update date

LaunchedEffect(key1 = Unit) {

    rememberPersianDialogDatePicker.updateDate(date = Date())
    rememberPersianDialogDatePicker.updateDate(timestamp = Date().time)
    rememberPersianDialogDatePicker.updateDate(
        persianYear = 1403,
        persianMonth = 7,
        persianDay = 20
    )

    rememberPersianBottomSheetDatePickerController.updateDate(date = Date())
    rememberPersianBottomSheetDatePickerController.updateDate(timestamp = Date().time)
    rememberPersianBottomSheetDatePickerController.updateDate(
        persianYear = 1403,
        persianMonth = 7,
        persianDay = 20
    )
}


rememberPersianDialogDatePicker.updateMaxYear(1420)
rememberPersianDialogDatePicker.updateMinYear(1395)
rememberPersianDialogDatePicker.updateYearRange(10)
rememberPersianDialogDatePicker.updateDisplayMonthNames(false)


rememberPersianBottomSheetDatePickerController.updateMaxYear(1420)
rememberPersianBottomSheetDatePickerController.updateMinYear(1395)

PersianLinearDatePickerDialog(
    rememberPersianDatePicker,
    Modifier.fillMaxWidth(),
    onDismissRequest = { showDialog.value = false },
    onDateChanged = { year, month, day ->
        // do something...
    }
)

DatePickerLinearModalBottomSheet(
    modifier = Modifier
        .fillMaxSize(),
    sheetState = bottomSheetState,
    controller = rememberPersianBottomSheetDatePickerController,
    onDismissRequest = {
        coroutine.launch {
            bottomSheetState.hide()
        }
    }
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants