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 {
119
119
func toExternalDateTimeInputStyle (style string ) gqlmodel.DateTimeInputStyle {
120
120
switch style {
121
121
case model .DateTimeInputFancy :
122
- return model . DateTimeInputFancy
122
+ return gqlmodel . DateTimeInputStyleFancy
123
123
case model .DateTimeInputNative :
124
- return model . DateTimeInputNative
124
+ return gqlmodel . DateTimeInputStyleNative
125
125
default :
126
- panic ( "unknown datetime input style" )
126
+ return gqlmodel . DateTimeInputStyleFancy
127
127
}
128
128
}
129
129
@@ -134,6 +134,6 @@ func toInternalDateTimeInputStyle(style gqlmodel.DateTimeInputStyle) string {
134
134
case gqlmodel .DateTimeInputStyleNative :
135
135
return model .DateTimeInputNative
136
136
default :
137
- panic ( "unknown datetime input style" )
137
+ return model . DateTimeInputFancy
138
138
}
139
139
}
Original file line number Diff line number Diff line change @@ -62,5 +62,7 @@ func TestShouldHandleInvalidInputs(t *testing.T) {
62
62
toInternalTheme ("aoeuaoeu" )
63
63
toExternalDateLocale ("aeu" )
64
64
toInternalDateLocale ("aoeu" )
65
+ toExternalDateTimeInputStyle ("aoeu" )
66
+ toInternalDateTimeInputStyle ("aoeu" )
65
67
66
68
}
You can’t perform that action at this time.
0 commit comments