Skip to content

Instantly share code, notes, and snippets.

View wylie39's full-sized avatar
😁

Wylie Fowler wylie39

😁
View GitHub Profile
@bgriggs1
bgriggs1 / gist:6107ed1238405415c254
Created October 13, 2014 15:45
Update a date/time field with an inline table edit
// this event handler will update a date/time field when a value is updated with inline editing
// change view_1 to the view key of the table with inline editing
$(document).on('knack-cell-update.view_1', function(event, view, data) {
// create a JS date object
var todayDate = new Date();
todayDate.setHours(todayDate.getHours() - 7); // make any timezone changes
// create an object for the data to update