thuijzer / processwire-fieldtypebusinesshours Goto Github PK
View Code? Open in Web Editor NEWProcessWire Fieldtype for entering business hours (opening hours)
ProcessWire Fieldtype for entering business hours (opening hours)
As of Processwire 3.0.140 there exists a new function in Fields.php called getCompatibleFieldtypes, which unfortunately breaks the Business hours fieldtype. This is the php error I get once I try to open the settings of the fields:
Fatal Error: Uncaught Error: Call to a member function prepend() on null in /srv/www/wire/core/Fields.php:1066 Stack trace: #0 /srv/www/wire/modules/Process/ProcessField/ProcessField.module(1412): ProcessWire\Fields->getCompatibleFieldtypes(Object(ProcessWire\Field)) #1 /srv/www/wire/core/Wire.php(380): ProcessWire\ProcessField->___buildEditFormBasics() #2 /srv/www/wire/core/WireHooks.php(813): ProcessWire\Wire->_callMethod('___buildEditFor...', Array) #3 /srv/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessField), 'buildEditFormBa...', Array) #4 /srv/www/wire/modules/Process/ProcessField/ProcessField.module(1020): ProcessWire\Wire->__call('buildEditFormBa...', Array) #5 /srv/www/wire/core/Wire.php(380): ProcessWire\ProcessField->___buildEditForm() #6 /srv/www/wire/core/WireHooks.php(813): ProcessWire\Wire->_callMethod('___buildEditFor...', Array) #7 /srv/www/wire/core/Wire.php (line 1066 of /srv/www/wire/core/Fields.php) This error message was shown because: you are logged in as a Superuser. Error has been logged.
Hey @thuijzer
thanks for this wonderful plugin. Very helpful!
One question is it somehow possible to get the end of the current range?
Let's say it's Monday at 15:00h, the range for Monday is 10.00-12.00,13.00-17.00
I would need to get 17:00 to calculate the remaining time a visitor has to join the party (2hours).
Thanks for your help!
Cheers,
Toni
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.