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

datepicker format error #1

Open
caishanli opened this issue Apr 28, 2021 · 0 comments
Open

datepicker format error #1

caishanli opened this issue Apr 28, 2021 · 0 comments

Comments

@caishanli
Copy link

Hi:
I see that datepicker's default format is mm/dd/yy, like 04/28/2021, but I want to set datepicker's format as 2021-04-28, so I modify argon.js and add dateFormat to datepicker, like this:
`var Datepicker = (function() {

// Variables

var $datepicker = $('.datepicker');


// Methods

function init($this) {
	var options = {
		disableTouchKeyboard: true,
		autoclose: false,
		dateFormat: "yy-mm-dd"
	};

	$this.datepicker(options);
}


// Events

if ($datepicker.length) {
	$datepicker.each(function() {
		init($(this));
	});
}`

})();

But this not work, what should I do?
Thank you!

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