Merged
Conversation
omotnyk
reviewed
Apr 26, 2022
Comment on lines
+19
to
+26
| @JsonIgnore | ||
| default Optional<String> getStringValue() { | ||
| DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yy"); | ||
| if (getSelectedDate().isPresent()) { | ||
| return Optional.of(getSelectedDate().get().format(formatter)); | ||
| } | ||
| return Optional.empty(); | ||
| } |
Contributor
There was a problem hiding this comment.
Two notes here:
- Why do we need this method?
- I feel a bit uncertain about the date format. This is US date format and I'm not sure this string is going to be expected in all the cases by all the users of the method. I think in the simplest case we should default to the international format.
- The date format is completely different in DatePickerIF, which also adds some confusion around this.
Contributor
Author
There was a problem hiding this comment.
- we definitely need this method, because we filtered properties without values, you can see this in
DefaultViewInputValueExtractorand related classes.
2-3. this again related to our date formar parsing, I choose US format as a default string value.
Contributor
Author
There was a problem hiding this comment.
In general, after our conversation, I agree that to be more flexible we don’t need this method, because each user of this code can have their own date/time format, so I removed getStringValue methods from Date and Time pickers.
Comment on lines
+20
to
+26
| default Optional<String> getStringValue() { | ||
| DateTimeFormatter formatter = DateTimeFormatter.ofPattern("H:mm"); | ||
| if (getSelectedTime().isPresent()) { | ||
| return Optional.of(getSelectedTime().get().format(formatter)); | ||
| } | ||
| return Optional.empty(); | ||
| } |
Contributor
There was a problem hiding this comment.
Why do we need this method?
Contributor
Author
|
@omotnyk thanks for review, can you take a look again? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support of
TimePickerfor BlockKit. Also added missinggetStringValuefor DatePicker and TimePicker to getting dates value in text format