jquery ui datepicker时间格式

下载jquery ui 的版本不同该功能的时间格式也不同;

修改英文格式找到如下类似代码进行修改:修改它的构造函数;

function Datepicker() 
{
	this._curInst = null; // The current instance in use

        this._keyEvent = false; // If the last event was a key event

        this._disabledInputs = []; // List of date picker inputs that have been disabled

        this._datepickerShowing = false; // True if the popup picker is showing , false if not

        this._inDialog = false; // True if showing within a "dialog", false if not

        this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division

        this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class

        this._appendClass = "ui-datepicker-append"; // The name of the append marker class

        this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class

        this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class

        this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class

        this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class

        this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class

        this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class

        this.regional = []; // Available regional settings, indexed by language code

        this.regional[""] = 
        { 
		closeText: "Done", 

		prevText: "Prev", 

		nextText: "Next", 

		currentText: "Today", 

		monthNames: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], 

		monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 

		dayNames: ["日", "一", "二", "三", "四", "五", "六"], 

		dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],

                dayNamesMin: ["日","一","二","三","四","五","六"], 

		weekHeader: "Wk",

                dateFormat: "mm/dd/yy",

		firstDay: 0, 

		isRTL: false, 

		showMonthAfterYear: false, 

		yearSuffix: ""
	};
2)将时间格式转换为自己想要的:

举例:

$("#xxx").datepicker({dateFormat:'yy-mm-dd'});	

或者直接修改上面dateFormat位置;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值