Replace the Placeholder

Tags: #<Tag:0x00007efc61b73c20> #<Tag:0x00007efc61b73ae0>

Hello,
How can I replace the placeholder from (value) to (YYYY-MM-DD) and from the (second value) to the (YYYY-MM-DD) in the dropdownMenu for the date column only, specifically when the “between” filter option is selected?

From this picture


To this picture

I hope you could provide me with code sample and thank you in the advance

Hi @ykifahh

Welcome on the forum.

to alter values you would need to create custom language and then use it in your application.

Here https://github.com/handsontable/handsontable/blob/e1256149eef033a7e628a3172b17ce046a915f2c/handsontable/languages/en-US.js#L155 is the placement of the Value and Second value strings. You can copy that language to change only those two values and then load it using tips from this tutorial https://handsontable.com/docs/javascript-data-grid/language/#load-the-prepared-language-files.

Thank you for your response. However, this approach will update all the value placeholders, whereas I only need to modify the one in the date column.

You are right. Currently there is no way, unfortunately, to set up custom languages per columns. I was looking for other options but the only one would be to create custom dropdown menu options and that’s a lot of custom coding.

Thank you! So, there no way to add a placeholder to a specific date column in the dropdown menu options, right?

Without creating your own logic for filters, no, there isn’t a way.

Alternatively, there might be some hacky CSS content manipulation option, but we wouldn’t recommend that, as it can fail in many different scenarios. And this is only a theory - we did not try it.

Thank you :slight_smile: