top of page

Forum Posts

Melissa Alexander
Mar 02, 2020
In Coding with Velo
Hello, I'd like to combine the input from separate date and time pickers in a form into one column in my database. Ive looked through the forum and come across several examples that I am trying to build off of, basically breaking the date and time inputs down to their constituent parts, then building back up to a javascript element in milliseconds to pass on to the database with set field values. // deconstruct date and time $w.onReady(function () { let Y = ($w("#textDate").value.getFullYear()-1970)*31556952000; let M = $w("#textDate").value.getMonth()*2592000000; let D = ($w("#textDate").value.getDate()-1)*86400000; let hour = ($w("#textTime").value.slice(0, 2)-3)*3600000; let min = $w("#textTime").value.slice(3, 5)*60000; let datetime = new Date(Y+M+D+hour+min); console.log(datetime) $w("meetingNotesWrite").setFieldValue("dateTime", datetime); }); This seems to work in the console log but the database doesnt pick up anything at all (the code for the submit button is elsewhere in the code but is working for other fields. Any insight?
Combine Date Picker and Time Picker to one Date/Time column in database content media
0
1
970
Melissa Alexander
Sep 22, 2019
In Coding with Velo
Hello, I am creating a page with a dropdown to filter to a specific database item for a google map (and other info). Everything works great in preview...the map updates to a new location based on the dropdown value. In the published version, the map doesn't change locations when the dropdown selection changes. All the other items...address, image, etc...work fine in preview and publish. I know issues that pop up in publish but not preview are usually related to permissions, but the dataset loaded on the page is set to read-write, and the collection is set so anyone can make changes. //individual facilities code below let selectedLongitude = ""; let selectedLatitude = ""; export function facilityDropdown_change(event, $w) { $w("#facilitiesdata").onCurrentIndexChanged((index) => { let itemObj = $w("#facilitiesdata").getCurrentItem(); selectedLongitude = itemObj.longitude; selectedLatitude = itemObj.latitude; console.log(selectedLatitude) $w("#googleMaps1").location = { "latitude": selectedLongitude, "longitude": selectedLatitude, }; }) } Help!
Google Maps Single Location Publish Issue content media
0
11
97

Melissa Alexander

More actions
bottom of page