Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amityweb opened this issue Oct 1, 2019 · 0 comments
Open

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

amityweb opened this issue Oct 1, 2019 · 0 comments

Comments

@amityweb
Copy link

amityweb commented Oct 1, 2019

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
			
		});
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant