[Solved] Element Error: Error in render: TypeError: dateStr.match is not a function“

This error is because the data type of the date component of Element cannot be Number

Solution: convert data to the string

number type to string type (recommended way two)
Method 1.
var date = toString(2022); // Disadvantage: can't convert underfind and null
Way 2
var date = String(2022); // can convert underfind and null
Way 3
var date = 2022 + ''; // string splicing    

Read More: