• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

contributte / forms-bootstrap / #57

12 Mar 2024 07:10PM UTC coverage: 82.649% (-0.7%) from 83.353%
#57

Pull #90

github

dakorpar
BC: Compatibility with nette/forms 3.1.14
renamed addDate, addDateTime to addBootstrapDate and addBootstrapDateTime.
added Date/DateTime/Time/Color inputs which acts as default nette forms
Pull Request #90: BC: Compatibility with nette/forms 3.1.14

15 of 25 new or added lines in 3 files covered. (60.0%)

705 of 853 relevant lines covered (82.65%)

5.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/Inputs/DateTimeControl.php
1
<?php declare(strict_types = 1);
2

3
namespace Contributte\FormsBootstrap\Inputs;
4

5
use Contributte\FormsBootstrap\BootstrapUtils;
6
use Contributte\FormsBootstrap\Traits\StandardValidationTrait;
7
use Nette\Utils\Html;
8

9
class DateTimeControl extends \Nette\Forms\Controls\DateTimeControl
10
{
11

12
        use StandardValidationTrait;
13

14
        /**
15
         * Input accepted format.
16
         * Default is d.m.yyyy
17
         *
18
         * @var string
19
         */
20
        private $format;
21

22
        /** @var bool */
23
        private $isValidated = false;
24

25
        public function getControl(): Html
26
        {
27
                $control = parent::getControl();
1✔
28
                BootstrapUtils::standardizeClass($control);
1✔
29

30
                $control->class[] = 'form-control';
1✔
31

32
                return $control;
1✔
33
        }
34

35
        /**
36
         * @inheritdoc
37
         */
38
        public function validate(): void
39
        {
NEW
40
                parent::validate();
×
41

NEW
42
                $this->isValidated = true;
×
43
        }
44

45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc