Skip to content

Commit 4c3d589

Browse files
fix when today was selected to start date
1 parent 5518986 commit 4c3d589

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/views/plugins/quota/CreateQuotaTariff.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ import { api } from '@/api'
9898
import { ref, reactive, toRaw } from 'vue'
9999
import TooltipLabel from '@/components/widgets/TooltipLabel'
100100
import { getQuotaTypes } from '@/utils/quota'
101-
import { dayjs, parseDayJsObject } from '@/utils/date'
101+
import { dayjs, isDayJsObjectToday, parseDayJsObject } from '@/utils/date'
102102
import { mixinForm } from '@/utils/mixin'
103103
104104
export default {
@@ -145,7 +145,7 @@ export default {
145145
values.usageType = values.usageType.split('-')[0]
146146
147147
if (values.startDate) {
148-
values.startDate = parseDayJsObject({ value: values.startDate, format: 'YYYY-MM-DD' })
148+
values.startDate = isDayJsObjectToday(values.startDate) ? null : parseDayJsObject({ value: values.startDate, format: 'YYYY-MM-DD' })
149149
}
150150
151151
if (values.endDate) {

0 commit comments

Comments
 (0)