本文整理了Java中org.hippoecm.frontend.plugins.yui.datetime.YuiDateTimeField.invalid()
方法的一些代码示例,展示了YuiDateTimeField.invalid()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YuiDateTimeField.invalid()
方法的具体详情如下:
包路径:org.hippoecm.frontend.plugins.yui.datetime.YuiDateTimeField
类名称:YuiDateTimeField
方法名:invalid
暂无
代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui
private void updateDateTime(Date date, Integer hours, Integer minutes) {
if(date!=null) {
MutableDateTime datetime = new MutableDateTime(date);
try {
TimeZone zone = getClientTimeZone();
if (zone != null) {
datetime.setZone(DateTimeZone.forTimeZone(zone));
}
if (hours != null) {
datetime.set(DateTimeFieldType.hourOfDay(), hours % 24);
datetime.setMinuteOfHour(minutes != null ? minutes : 0);
}
// the date will be in the server's timezone
setDate(datetime.toDate());
//setModelObject(datetime.toDate());
} catch (RuntimeException e) {
error(e.getMessage());
invalid();
}
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-api
private void updateDateTime() {
final Date date = getDate();
if (date != null) {
final MutableDateTime dateTime = new MutableDateTime(date);
try {
final TimeZone zone = getClientTimeZone();
if (zone != null) {
dateTime.setZone(DateTimeZone.forTimeZone(zone));
}
setHourAndMinutes(dateTime);
// the date will be in the server's timezone
setDate(dateTime.toDate());
setModelObject(dateTime.toDate());
} catch (final RuntimeException e) {
error(e.getMessage());
invalid();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!