Skip to content

Commit

Permalink
DateTime, Date and Time inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMystikJonas committed Aug 9, 2022
1 parent b29b6db commit 654dbf8
Show file tree
Hide file tree
Showing 15 changed files with 1,528 additions and 37 deletions.
35 changes: 31 additions & 4 deletions .docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
## Content

- [Setup](#setup)
- [ApplicationFormFactoryExtension - provides Nette\Application\UI\Form factory](#application-form-factory)
- [StandaloneFormFactoryExtension - provides Nette\Forms\Form factory](#standalone-form-factory)
- Form factory DI extensions
- [ApplicationFormFactoryExtension](#application-form-factory) (Nette\Application\UI\Form)
- [StandaloneFormFactoryExtension](#standalone-form-factory) (Nette\Forms\Form)
- Controls
- [Date/time inputs](#date-time-inputs) (DateTimeInput, DateInput, TimeInput)

## Setup

```bash
composer require contributte/forms
```

## Application Form Factory
## DI extensions

### Application Form Factory

ApplicationFormFactory returns instance of `Nette\Application\UI\Form`. It should be used in place of StandaloneFormFactory if [nette/application](https://github.com/nette/application) is installed.

Expand Down Expand Up @@ -85,7 +90,7 @@ final class UserFormFactory
}
```

## Standalone Form Factory
### Standalone Form Factory

StandaloneFormFactory returns instance of `Nette\Forms\Form`. It should be used only if [nette/application](https://github.com/nette/application) is not installed.

Expand Down Expand Up @@ -157,3 +162,25 @@ final class UserFormFactory

}
```
## Controls

### Date/time inputs

features

#### Usage

#### Native input types (datetime-local, date)

#### Text input type - formats

#### Data attributes - for JavaScript picker
value, min, max, settings

#### Validation - min, max, range, invalidFormat

#### DateTimeInput - input timezone




5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"Contributte\\Forms\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\Fixtures\\": "tests/fixtures"
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
Expand Down
1 change: 1 addition & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Contributte\Forms"/>
<element key="tests/fixtures" value="Tests\Fixtures"/>
</property>
</properties>
</rule>
Expand Down
Loading

0 comments on commit 654dbf8

Please sign in to comment.