下記の内容をモバイル版でも表示させたい
(function() {
‘use strict’;
const my_field_code = 'Now_datetime';
const my_space_ID = 'button_space';
const events = [
'app.record.create.show',
'app.record.edit.show',
];
const evenys = [
'mobile.app.record.create.show',
'mobile.app.record.edit.show',
];
kintone.events.on(events, function(event) {
const record = event.record;
const startButton = document.createElement('button');
startButton.innerText = '打刻ボタン';
startButton.onclick = function() {
const currentDatetime = new Date().toISOString();
record[my_field_code].value = currentDatetime;
kintone.app.record.set(event);
};
kintone.app.record.getSpaceElement(my_space_ID).appendChild(startButton);
return event;
});
})();