Workspace Date Dropdown Ignores custom formatting of the date

Hey,

I am building a worspace to search things based on a date field which has DD/MM/YYYY formatting setup which works fine everywhere except in the workspace when using the Dropdown Widget:

It has instead YYYY-MM-DD formatting.

Is this a miss ?

Thanks team!

Hello @Simon_BRAMI1

Thank you for reaching out !

I can reproduce this bug on my end.

We’ll keep you updated once this has been fixed.

Regards,
Nicolas

1 Like

Hey @nbouliol,

We’re having another issue with the same dropdown, fyi the field targeted is a DATEONLY field, and we cannot search any value even with Search Enabled.

It’s trying to compare my search string with the date without a CAST so nothing happens.

The backend returns this error:

[forest] 🌳🌳🌳  Unexpected error: operator does not exist: date ~~ unknown
{
  "name": "SequelizeDatabaseError",
  "parent": {
    "length": 201,
    "name": "error",
    "severity": "ERROR",
    "code": "42883",
    "hint": "No operator matches the given name and argument types. You might need to add explicit type casts.",
    "position": "199",
    "file": "parse_oper.c",
    "line": "647",
    "routine": "op_error",
    "sql": "SELECT \"catalogue_item_id\" AS \"catalogueItemId\", \"end_opco\" AS \"endOpco\", \"catalogue_item_id\" AS \"catalogueItemId\" FROM \"public\".\"catalogue_item\" AS \"catalogueItem\" WHERE \"catalogueItem\".\"end_opco\" LIKE '2023-11-25' LIMIT 100 OFFSET 0;"
  },
  "original": {
    "length": 201,
    "name": "error",
    "severity": "ERROR",
    "code": "42883",
    "hint": "No operator matches the given name and argument types. You might need to add explicit type casts.",
    "position": "199",
    "file": "parse_oper.c",
    "line": "647",
    "routine": "op_error",
    "sql": "SELECT \"catalogue_item_id\" AS \"catalogueItemId\", \"end_opco\" AS \"endOpco\", \"catalogue_item_id\" AS \"catalogueItemId\" FROM \"public\".\"catalogue_item\" AS \"catalogueItem\" WHERE \"catalogueItem\".\"end_opco\" LIKE '2023-11-25' LIMIT 100 OFFSET 0;"
  },

It’s very blocking for us, what do you recommend to use in our workspace instead ?

Thanks

Hello @Simon_BRAMI1,

Sorry for the response delay.

To be honest, here we’re missing one component: the Date Picker component.
It will enable to select a timestamp / date and from this, you’ll be able to filter out your other components.
This component will surely come out soon, I just can’t tell you exactly when.

The issue you’re pointing in your latest message is due to the fact that Sequelize doesn’t know how to do to know if a date or a dateonly contains a value (the search is about “containing some characters”).
So the search should not be used with Date fields.

I guess for now, waiting for the Date Picker component, the solution would be to create a dynamic smart dropdown to make it do what you’d like.

We’ll let you know once there are some news on the topic.

Cheers!

1 Like

Hello @Simon_BRAMI1,

I hope you’re doing great.

This message just to let you know that the new Date Picker component in Workspace has been released.
I hope you’ve seen that news!
Let me know if it helps you’re use cases and if you have any feeback.

Cheers!

1 Like