Skip to content

format:'mm/dd/yyyy' does not format initial value of form field #246

@amityweb

Description

@amityweb

When using date picker in an edit form field, the field value does not honour the format:'mm/dd/yyyy' setting. When you click the field to open date picker, and then click off it to close it, it does change the format then.

So this field displays the value as 2019-09-23 even though format format: 'dd/mm/yyyy' is used.
<input type="text" id="startDate" name="fields[startDate]" class="date-picker" value="2019-09-23">

	// Date Picker Fields
	if( $('.date-picker').length > 0 )
	{
		$('.date-picker').fdatepicker({
			format: 'dd/mm/yyyy',
			disableDblClickSelection: true,
			leftArrow:'<<',
			rightArrow:'>>',
			closeIcon:'X',
			closeButton: true
			
		});
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions