SingleDateAndTimePicker icon indicating copy to clipboard operation
SingleDateAndTimePicker copied to clipboard

Year picking doesn't work

Open CarsonRedeye opened this issue 5 years ago • 6 comments

1.Set .displayYears(true)

  1. pick a year.
  2. Click OK. Expected: Year is year picked Actual: Year remains current year

CarsonRedeye avatar Jan 14 '19 03:01 CarsonRedeye

1.Set .displayYears(true)

  1. pick a year.
  2. Click OK. Expected: Year is year picked Actual: Year remains current year

try the version on my fork

nilput avatar Jan 14 '19 09:01 nilput

Any updates on this?

10erlosh avatar Feb 26 '19 10:02 10erlosh

The best I can do is set it like this: .displayDays(false) .displayDaysOfMonth(true) .displayMonthNumbers(true) .displayMonth(true) .displayYears(true) .displayHours(true) .displayMinutes(true) .displayAmPm(false)

Then year picks correctly.

CarsonRedeye avatar Mar 07 '19 06:03 CarsonRedeye

I like the library but this bug is really annoying. I am not able to change the year either

agustinsivoplas avatar Aug 02 '19 14:08 agustinsivoplas

I make it work


        <com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker
            android:id="@+id/templateInputDatePicker"
            android:layout_width="0dp"
            android:layout_height="@dimen/date_picker_height"
            android:layout_marginTop="@dimen/default_margin_large_medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/templateInputDateTitleTextView"
            app:picker_curved="true"
            app:picker_cyclic="true"
            app:picker_displayHours="true"
            app:picker_displayMinutes="true"
            app:picker_displayYears="true"
            app:picker_displayDays="false"
            app:picker_displayDaysOfMonth="true"
            app:picker_displayMonth="true"
            app:picker_selectedTextColor="@color/white"
            app:picker_selectorColor="@color/white"
            app:picker_textColor="@color/white_alpha_20" />

agustinsivoplas avatar Aug 02 '19 15:08 agustinsivoplas

This is alternative solution to identify year.

It will display Date format like "Sun 23 Jan 2020"

SimpleDateFormat df = new SimpleDateFormat("E dd MMM yyyy"); .setDayFormatter(df)

dharmesh395 avatar Jan 22 '20 12:01 dharmesh395