Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Wrong day name #313

Open
MerveGencer opened this issue Jan 11, 2021 · 3 comments
Open

Wrong day name #313

MerveGencer opened this issue Jan 11, 2021 · 3 comments

Comments

@MerveGencer
Copy link

MerveGencer commented Jan 11, 2021

There is an issue with the day names, 10th of January on 2021 is Sunday and it is displayed as Monday on the picker view. "Today" is ignored counting days, so 1 day before "today" is actually today.

I am using it in a dialog layout with these parameters:

<com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker
            android:id="@+id/single_day_picker"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/spacing_16dp"
            app:picker_itemSpacing="6dp"
            app:picker_selectorColor="@android:color/transparent"
            app:picker_stepSizeHours="1"
            app:picker_stepSizeMinutes="5"
            app:picker_cyclic="true"
            app:picker_mustBeOnFuture="true"
            app:picker_visibleItemCount="7"
            app:fontFamily="@font/inter_medium_family"
            app:picker_textColor="@color/primaryTextColor"
            app:picker_selectedTextColor="@color/yellowish"
            app:picker_displayYears="true"
            />

And here is the result ( I also put the year in order to be more clear):

Screen Shot 2021-01-11 at 16 03 49

@shervinkoushan
Copy link

Remove app:picker_mustBeOnFuture="true"

In your java/kotlin file: datePicker.setMustBeOnFuture(true)

@MerveGencer
Copy link
Author

Yeah, removed setting the attribute through xml and set it inside kotlin and now it is working. But still, this is an issue that needs to be fixed.

@shervinkoushan
Copy link

Happy you got it working. I agree, it should be fixed.

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

No branches or pull requests

2 participants