Skip to content
On this page

Time Rules

Date with rules

Value:1/15/2000, 12:00:00 AM (Date)
S
M
T
W
T
F
S
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
SatJan152000
:
vue
<template>
  <VDatePicker v-model="date" mode="dateTime" :rules="rules" />
</template>

<script setup>
import { ref } from 'vue';

const date = ref(new Date(2000, 0, 15));
const rules = {
  hours: 3,
  minutes: { interval: 5 },
  seconds: 4,
  milliseconds: 500,
};
</script>

Date range with rules

Start:8/15/2022, 12:00:00 AM (date)
End:8/19/2022, 12:00:00 AM (date)
S
M
T
W
T
F
S
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
MonAug152022
:
FriAug192022
:
vue
<template>
  <VDatePicker v-model.range="date" mode="dateTime" :rules="rules" />
</template>

<script setup>
import { ref } from 'vue';

const range = ref({
  start: new Date(2022, 7, 15),
  end: new Date(2022, 7, 19)
});
const rules = ref({
  hours: [2, 4, 7, 10, 14, 15, 16],
  minutes: { interval: 2 },
  milliseconds: 0,
});
</script>

Released under the MIT License.