[FEAT] Remove moment lib from Datepicker
frgiovanna opened this issue · 1 comments
frgiovanna commented
Is your feature request related to a problem? Please describe.
The Datepicker component is using the moment
library as a dependency. This lib was deprecated and its own documentation gives advice to finding another lib to do the same as it does.
Describe alternatives you've considered
We can use the date-fns lib, which is a great and well-maintained one, and use its format
function the same way we're doing with the moment
.
On the Datepicker component:
import { format } from 'date-fns';
// ...
return (
startD && (
<Input disabled={disabled}>
{format(startD, dateFormat)}
{endD && ` - ${format(endD, dateFormat)}`}
</Input>
)
);
caiotracera commented
Hey, @frgiovanna!
I think it's a great idea! Do you feel comfortable to make this change and create the PR?