お世話になっております。
タイトルの件について、record.create.submitとrecord.edit.submitイベントで日付フィールドに日付を入力後、レコード別の日付けフィールドに一ヶ月後の日付けを表示させたいと考えております。
下記内容で作成してみたのですが、うまくいかず、質問させていただきました。
どこかおかしいところはありますでしょうか?
ご教授のほど、宜しくお願い致します。
*----------------------------------------------------------------------*
フィールドタイプ:日付 date:日付
フィールドタイプ:日付 date1:日付
*----------------------------------------------------------------------*
(function () {
“use strict”;
//moment.locale(‘ja’);
kintone.events.on([‘app.record.create.submit’, ‘app.record.edit.submit’], function (event) {
if (!event.record) {
alert(“dame da”);
return event;
}
moment.locale(‘ja’);
varrecord=event.record;
vardate_one=newDate(record.date.value);
varpayment_date=moment(date_one).add(1, ‘month’).endOf(‘month’).format('YYYY/MM/DD ');
//console.log(typeof(payment_date));
record.date1.value=moment(record.date.value).add(1, ‘month’).endOf(‘month’).format('YYYY/MM/DD ');
return event;
});
*----------------------------------------------------------------------*