DrAugus
DrAugus

Reputation: 13

How to use dayjs in typescript

import * as dayjs from 'dayjs'

try another

const dayjs = require('dayjs')

How can I do?

Upvotes: 1

Views: 3164

Answers (1)

Karl Park
Karl Park

Reputation: 56

I am using dayjs in my typescript project like below

import dayjs from 'dayjs';
:
this.date = params.get('date') ? dayjs().format('DD/MM/YYYY') : '';

Upvotes: 4

Related Questions