Hello everyone,
So i have made a sample project where i want to customize my Expirydate column. What i want to do is i want the calndar to only display month and year not dates is that possible?
Second, when i m applying filter and selecting some date so its showing in format like 09/2023 but i want it like i used in my column september , 2023 is that possible?
Third , IS $.ig.formatter and fomatter function same?IF yes then please provide an example how to use that and like how will ig.formatter get a custom value of a field to edit.
$.ig.formatter
Looking forward to your response.
Thanks and Regards,
Rohit Rawat
Hello Rohit,
Thank you for posting in our community!
I have been looking into your questions and regarding the first one, I have noticed that a similar one is asked in the following forum thread here where an answer has already been provided.
Additionally, regarding the second one what I could say is that in order to display the selected date in a different date format, you could set the dateDisplayFormat option which is used to get/set the format of the date while the editor has no focus. Also, I would recommend setting the dateInputFormat as well since it gets the format of the date while the editor has focus and if the option is not set, then the "date" format is used automatically.
This could look similar to the following:
$("#grid").igGrid({ ... columns: [ ... { headerText: "Register Date", key: "RegistererDate", dataType: "date" } ], features: [ { name: "Filtering", columnSettings: [ { columnKey: "RegistererDate", editorType: "datepicker", editorOptions: { dateInputFormat: "MM/yyyy", dateDisplayFormat: "MMMM yyyy", }, }, ], }, ], });
However, please note that when opening the date picker drop down or clicking on the date picker input itself, the input value is always displayed with digits, and this is the default and expected behavior. More useful information could be found in our igDatePicker section here.
Finally, regarding your last question, please keep in mind that according to our support policy we handle a single issue/question per thread and since the initial theme is regarding the igDatePicker what I would suggest is addressing your question about the formatter function in a separate thread. This is for better consistency and history tracking.
Please let me know if you need any further assistance regarding this matter.
Sincerely, Riva Ivanova Associate Software Developer
One more thing suppose i want to change option of my date picker which is present in expirydate column using
$(
".selector"
).igDatePicker(
"option"
,
"dateDisplayFormat"
"dateLong"
);
How can i do that using above. I m confused what will be the selector for that row?