25
Views
2
Comments
[SurveyJS For Reactive] How to change the Date formate as dd/mm/yyyy
surveyjs-for-reactive
Reactive icon
Forge asset by Francisco Silva
Application Type
Reactive

Hi there,

Do we have any option to change the date format as dd/MM/yyyy when there is input widget with type date in the survey form.


Thanks
Pankaj

2024-01-20 14-53-12
Ahmed Essawy

I think  it is possible to change the date format of an input widget with type "date" in a survey form to dd/MM/yyyy. To do this, you can use the "format" property of the input widget.

Here's an example of how you can set the format property:

{    "type": "input",    "name": "myDate",    "inputType": "date",    "title": "Select a date",    "format": "dd/MM/yyyy" } 

In the above example, the "format" property is set to "dd/MM/yyyy", which specifies the date format as day/month/year. You can adjust this format string to suit your needs.

Note that the "format" property is specific to the survey library you're using, so the syntax may differ depending on the library. The example above uses the default format property syntax for the SurveyJS library.

I hope this helps! 


UserImage.jpg
Pankaj Jain

Hi Ahmed Essawy,

Thanks for your reply. Although I did not find any format property. Please elaborate which format property  you are referring ?

Thanks
Pankaj

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.