Skip to content

Commit

Permalink
chore(stories): prevent extra regression in chromatic because of date
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed Nov 15, 2024
1 parent 7e65368 commit b8fbb09
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/ui/src/components/va-data-table/VaDataTable.demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export default defineComponent({
data () {
const formatDate = (date: Date) => {
return new Date(date).toLocaleDateString('en-Us', {
return date.toLocaleDateString('en-Us', {
month: '2-digit',
day: '2-digit',
year: 'numeric',
Expand All @@ -581,12 +581,11 @@ export default defineComponent({
}
})
const itemsForDateFormatFn: any[] = Array.from(Array(10), (u, i) => {
const date = new Date()
return {
id: i,
name: `Number ${i}`,
idSquared: `The squared index is ${i ** 2}`,
date: new Date(date.setDate(i + 1)),
date: new Date(1970, 1, i + 1),
}
})
itemsForDateFormatFn[itemsForDateFormatFn.length - 1].date = '2024/01/01'
Expand Down

0 comments on commit b8fbb09

Please sign in to comment.