简体   繁体   English

Ektron中的日期选择错误

[英]Date Select Error in Ektron

I have a form that is using the calendar/date selection tool within Ektron, but when users select the current date (or any date, for that matter), it gives an error saying that you need to select a date in the past. 我有一个使用Ektron中的日历/日期选择工具的表格,但是当用户选择当前日期(或任何日期,就此而言)时,会出现错误,提示您需要选择一个过去的日期。

We haven't tooled around in the code for this form, but it almost sounds like a validation issue. 我们没有为这种形式编写代码,但听起来几乎像是一个验证问题。

Here's the code, as is, from Ektron. 这是Ektron的代码。

<p align="center" style="text-align: left;">Date program was presented:&#160;
<ektdesignns_calendar title="Date presented" id="Date_presented" onblur="design_validate_xpath('number(translate(.,\'-\',\'\')) &lt;= number(translate($currentDate,\'-\',\'\'))',this,'Date in the past (required)');" ektdesignns_name="Date_presented" ektdesignns_caption="Date presented" ektdesignns_invalidmsg="Date in the past (required)" ektdesignns_validate="xpath:number(translate(.,'-','')) &lt;= number(translate($currentDate,'-',''))" ektdesignns_basetype="calendar" ektdesignns_datatype="date" ektdesignns_validation="datePast-req" name="Date_presented">
<input type="text" size="30" readonly="readonly" unselectable="on" />
<img width="16" height="16" class="design_fieldbutton" alt="Select date" src="[skinpath]btncalendar.gif" unselectable="on" /></ektdesignns_calendar></p>

My knowledge on validation is limited, but it looks like it's parsing the date as an integer. 我对验证的知识是有限的,但看起来好像是将日期解析为整数。 Is it possible to add a day (+1) to the current date so that it interprets any day as valid as long as it's not in the future? 是否可以在当前日期前加上一天(+1),以便它将任何一天解释为有效的(只要不是将来的一天)?

I guess this is a HTML form as opposed to a Smart form? 我猜这是HTML表单,而不是Smart表单?

If so, have you checked the validation settings on the calendar field? 如果是这样,您是否在日历字段中检查了验证设置? If you edit the form, right-click on the field and choose Field Properties you will get the properties window. 如果您编辑表单,请在字段上单击鼠标右键,然后选择“字段属性”,您将获得属性窗口。 Go to the Validation tab and check the setting in the Validation drop down. 转到“验证”选项卡,然后在“验证”下拉列表中检查设置。

There are options for ensuring the date is in the past or the future. 有一些选项可确保日期是过去或将来。 Perhaps one of these options has been set? 也许已经设置了这些选项之一?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM