still date filter is not working
# gd-beginners
g
still date filter is not working
p
Hello, what is the error that you are trying to solve? Does filter do not want to accept the available granularities you are trying to provide? What is the text of the error?
g
Date filter is not working
no text error
Type 'string[]' is not assignable to type 'DateFilterGranularity[]'.
please reply
p
This is a TypeScript issue as you are trying to assign strings to type. It’s strange that you have this issue when your code is in JavaScript and not TypeScript. Is by chance your project setup as TypeScript while you tru to write plain JavaScript? If you would have your files in TypeScript possibly the issue would went away. Alternatively, you can use TS assertion https://bobbyhadz.com/blog/typescript-type-string-is-not-assignable-to-type
I would expect that this is just issue reported by your IDE but actual code would work.