Skip to content

Update filter.md #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

EricTsao
Copy link
Contributor

@EricTsao EricTsao commented Sep 5, 2016

Field: calendar (CalendarField) not found. (Namespaces: Windwalker\Form\Field)

Change

$form->calendar('start_date')

to

$form->add('start_date', new CalendarField())

@asika32764
Copy link
Member

應該是 $this->calendar(...)

試試看能不能用

@EricTsao
Copy link
Contributor Author

EricTsao commented Sep 6, 2016

因為CalendarField的Namespace是 Phoenix\Field
要多加一段 $this->addNamespace('Phoenix\Field');
但不確定這樣是不是正確的寫法? 有辦法在裝Phoenix的時候就自動addNamespace嗎?

@asika32764
Copy link
Member

如果有 use PhoenixFieldTrait 的話應該可以直接使用 calendar()

你先試試看

@EricTsao
Copy link
Contributor Author

EricTsao commented Sep 6, 2016

可以了~!!
不過要用$this不能用$form

@asika32764
Copy link
Member

那就改成 $this 吧

@asika32764
Copy link
Member

Fixed by #26

@asika32764 asika32764 closed this Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants