File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ func toInternalWeekday(weekday gqlmodel.WeekDay) time.Weekday {
119119func toExternalDateTimeInputStyle (style string ) gqlmodel.DateTimeInputStyle {
120120 switch style {
121121 case model .DateTimeInputFancy :
122- return model . DateTimeInputFancy
122+ return gqlmodel . DateTimeInputStyleFancy
123123 case model .DateTimeInputNative :
124- return model . DateTimeInputNative
124+ return gqlmodel . DateTimeInputStyleNative
125125 default :
126- panic ( "unknown datetime input style" )
126+ return gqlmodel . DateTimeInputStyleFancy
127127 }
128128}
129129
@@ -134,6 +134,6 @@ func toInternalDateTimeInputStyle(style gqlmodel.DateTimeInputStyle) string {
134134 case gqlmodel .DateTimeInputStyleNative :
135135 return model .DateTimeInputNative
136136 default :
137- panic ( "unknown datetime input style" )
137+ return model . DateTimeInputFancy
138138 }
139139}
Original file line number Diff line number Diff line change @@ -62,5 +62,7 @@ func TestShouldHandleInvalidInputs(t *testing.T) {
6262 toInternalTheme ("aoeuaoeu" )
6363 toExternalDateLocale ("aeu" )
6464 toInternalDateLocale ("aoeu" )
65+ toExternalDateTimeInputStyle ("aoeu" )
66+ toInternalDateTimeInputStyle ("aoeu" )
6567
6668}
You can’t perform that action at this time.
0 commit comments