Skip to content

Conversation

Abhimanyu14
Copy link
Contributor

Fixed the app crash on changing the selected date for the date selection question.

Issue link: #512

import com.example.compose.jetsurvey.theme.JetsurveyTheme
import com.google.android.material.datepicker.MaterialDatePicker
import java.text.SimpleDateFormat
import java.util.Date
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these imports are no longer needed.
make sure you run spottlessApply

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

@florina-muntenescu florina-muntenescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of more small changes

fun onDatePicked(questionId: Int, date: String) {
updateStateWithActionResult(questionId, SurveyActionResult.Date(date))
fun onDatePicked(questionId: Int, pickerSelection :Long?) {
val selectedData = Date().apply {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - selectedDate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@Abhimanyu14 Abhimanyu14 force-pushed the abhimanyu/jetsurvey-issue-512 branch from cfadddd to b79e679 Compare May 27, 2021 18:24
@Abhimanyu14
Copy link
Contributor Author

@florina-muntenescu ,
Any more change required?

@florina-muntenescu
Copy link
Contributor

I missed this. Thank you @Abhimanyu14 for the changes!

@florina-muntenescu florina-muntenescu merged commit 35660c6 into android:main Jul 13, 2021
@Abhimanyu14 Abhimanyu14 deleted the abhimanyu/jetsurvey-issue-512 branch January 1, 2022 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants