diff --git a/src/NSwagStudio/ViewModels/CodeGenerators/SwaggerToTypeScriptClientGeneratorViewModel.cs b/src/NSwagStudio/ViewModels/CodeGenerators/SwaggerToTypeScriptClientGeneratorViewModel.cs
index 95271d2c1d..70a90c40eb 100644
--- a/src/NSwagStudio/ViewModels/CodeGenerators/SwaggerToTypeScriptClientGeneratorViewModel.cs
+++ b/src/NSwagStudio/ViewModels/CodeGenerators/SwaggerToTypeScriptClientGeneratorViewModel.cs
@@ -73,9 +73,8 @@ public OpenApiToTypeScriptClientCommand Command
.ToArray();
/// Gets the list of date time types.
- public TypeScriptDateTimeType[] DateTimeTypes { get; } = Enum.GetNames(typeof(TypeScriptDateTimeType))
- .Select(t => (TypeScriptDateTimeType)Enum.Parse(typeof(TypeScriptDateTimeType), t))
- .ToArray();
+ public TypeScriptDateTimeType[] DateTimeTypes { get; } =
+ (TypeScriptDateTimeType[])Enum.GetValues(typeof(TypeScriptDateTimeType));
/// Gets the list of null values.
public TypeScriptNullValue[] NullValues { get; } = Enum.GetNames(typeof(TypeScriptNullValue))