Feature Request: datetime fields and plugins

2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 18, 2018   (RSS)

I am working on a plugin to handle recurring events using the RRule specification (https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html). For the most part I have this working however a few challenges have presented themselves.

For a datetime field is it possible to add the ability to set the interval for Minutes. The default of 1 in many cases to too granular. I would like to reduce the size of the list by setting the interval to every 1, 5, 10, 15 or 30 minutes when appropriate. If an existing record has a value outside the interval, then the entire list could be built.

Also on the very odd occasion I would like to override the year outside the displayed range. Having an option to allow a manual override where a year can be entered would be useful. If you currently use the date picker and navigate to a date prior to the low year range and pick a date, the year is left blank. So If I use the default and leave the date range empty and navigate to say Sept 2010 and choose the 9th. I get Sept 9, and no year.

If I have an existing record with a year prior to the range, the missing years are automatically added to the selector.

I would like to hide the end_date until it is required and right now it requires additional coding to specify each component where a single attribute wrapper would hide all of them. It would be useful for plugins if the the entire field-group could be wrapped with a data attribute.

For instance: a field called

end_date

has 4 date components: mon, day, year and string. Having the ability to add our own data attribute would allow more control for writing custom javascript/jquery. Adding our own optional data attribute independent of the field name would allow the greatest flexibility and more bullet proof code.

If each field could have a data attribute such as data-fieldrow="end_date" applied to the enclosing form-group, this would provide a simple way to target the entire row(s). Multiple form-groups could have the same value.

<div class="form-group " data-fieldrow="end_date">
<div class="col-sm-2 control-label">End Date</div>
<div class="col-sm-10"><p class="help-block visible-xs"></p><div class="form-inline"><pstyle="display: inline" class="help-block hidden-xs"></p>

...

</div></div>
Jeff Shields