I'm trying to implement a ranged date picker (in v. 5.9.5) according to the documentation example at https://mantine.dev/dates/date-picker/ and I'm getting an error indicating that 'DateRangePickerValue' can't be found. I see an export for it in DateRangePicker.tsx but React can't seem to find it. Am I going about this the wrong way? I've attached screenshots of the error and my code (which I basically just pasted from the Docs). Thanks in advance for any help!
#'DateRangePickerValue' component not found
19 messages · Page 1 of 1 (latest)
import { DateRangePicker, DateRangePickerValue } from '@mantine/dates';
I see an export for it in DateRangePicker.tsx but React can't seem to find it
types are not global (usually), so react will not find it unless it's imported
Thanks, but I should have specified, I have imported
in that screenshot it is greyed out, how does your useState code look like currently
here is a codesandbox with 5.9.5 and DateRangePickerValue
double check your syntax in useState
if that doesn't solve it, try to restart your TS compiler
You know
can also try running npm or yarn again in case the package wasn't properly installed
Maybe the issue is that I'm using JS. I guess Mantine is typescipt based?
Sorry if this is a dumb question, this is my first time using Mantine
yeah, that's typescript syntax
it's worth moving over to typescript at some point, once you get past the learning curve it removes a lot of JS headaches
It's been on the to-do list
especially during migration, when you need to upgrade big projects it'll tell you where all the errors are, in JS you can only find out by running the app