Issue #2445πŸ’¬ AnsweredOpened Dec 6, 2019by kickbk1 reactions

Datetimepicker in a new component

Quick answerby artf❀ 1

Most of the logic you're doing in handleDateInputsOptions should be inside your component script. Your dateInputsSelect prop contains the input type, so use the interpolation in your script then apply the logic of handleDateInputsOptions. One other trick you'd need is to trigger script update in the canvas, so do this...

Read full answer below ↓

Question

I apologize for the length of this question! It's a whole new component an I'm almost done writing it, I just need a little bit of help and I believe this could be useful for others. I am creating a date select input that uses the daterangepicker lib. gathers all date type fields via the options. I have , , , and fields. I then later use their name and split on "-" to get the field type. I load the scripts one by one to avoid dependency issues (like "$ is not defined"). If you believe there's a more efficient way to do this, please advise. Once is loaded, I can run the function and indeed it...

Answers (1)

artfβ€’ Dec 10, 2019

Most of the logic you're doing in handleDateInputsOptions should be inside your component script. Your dateInputsSelect prop contains the input type, so use the interpolation in your script then apply the logic of handleDateInputsOptions. One other trick you'd need is to trigger script update in th...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.