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

Setting initial date does not work if the format is "M yyyy" #237

Open
anshajgoel opened this issue Feb 6, 2019 · 0 comments
Open

Setting initial date does not work if the format is "M yyyy" #237

anshajgoel opened this issue Feb 6, 2019 · 0 comments

Comments

@anshajgoel
Copy link

anshajgoel commented Feb 6, 2019

I was working with the date format M yyyy which translates to abbreviation of the month followed by the complete year number. For example, Jan 2019

If the Datepicker's intialDate is set with a date of this particular format, the initialization does not work.
Although if it is initialized with the date format mm-dd-yyyy it works perfectly.

Example Configurations:

<input type="text" class="span2" id="dp1">
<script>
$(function(){
	$('#dp1').fdatepicker({
		initialDate: 'Jan 2005',
		format: 'M yyyy',
		disableDblClickSelection: true,
		leftArrow:'<<',
		rightArrow:'>>',
		closeIcon:'X',
		closeButton: true
	});
});
</script>
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