widgetdateobtainerstrategy.js

来自「这是一个关于java的JSP页面中使用象Swing组件的一个库文件.」· JavaScript 代码 · 共 27 行

JS
27
字号
function uiCalendar_WidgetDateObtainerStrategy(inputId, inputName, optFormat) {  this._super();  var input = uiHtml_Element.createByEither(inputId, inputName);  this.__domInput = input.getDomObject();  this.__format = uiUtil_Type.getString(optFormat, "MM/dd/yyyy");}uiCalendar_WidgetDateObtainerStrategy = uiUtil_Object.declareClass(    uiCalendar_WidgetDateObtainerStrategy, uiUtil_Object);uiCalendar_WidgetDateObtainerStrategy.prototype.getNewDate =    function(selectedDate) {  try {    var newDate = uiUtil_Calendar.createFromString(        this.__domInput.value, this.__format);    return newDate.toDate();  }  catch (e) {    if (e instanceof uiUtil_CreateException) {      alert("Invalid date: " + this.__domInput.value +          ". Make sure that the date format is correct.");      return new Date();    }    else {      throw e;    }  }};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?