dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

dayjs('03-11-2023', { format: 'DD-MM-YYYY' }).format('DD-MM-YYYY') the result should be '03-11-2023'

Open thawinwats opened this issue 1 year ago • 1 comments

Describe the bug image

const date = dayjs('03-11-2023', { format: 'DD-MM-YYYY' }).format('DD-MM-YYYY')

Expected behavior the result should be the same as input 03-11-2023

Information [email protected]

thawinwats avatar Nov 30 '23 09:11 thawinwats

when using different formats you should add the plugin

import customParseFormat from 'dayjs/plugin/customParseFormat';
dayjs.extend(customParseFormat)

hope to be helpful

axshani avatar Dec 25 '23 12:12 axshani