Timeline for How do I allow date-time filtering on my custom entity's ISO date field
Current License: CC BY-SA 3.0
23 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 1, 2019 at 19:43 | comment | added | FiNeX | And what about "daterange" fields? | |
Feb 10, 2017 at 23:34 | history | bounty ended | CommunityBot | ||
Feb 7, 2017 at 12:46 | comment | added | Yuseferi |
@KevinNowaczyk There is not any sample of datetime in no documentation, I checked serveral modules, they all used created ,
|
|
Feb 7, 2017 at 11:44 | comment | added | Kevin Nowaczyk | Since I don't require the default action of the 'created' fieldtype, I'd say the correct answer is, "you can't. Use the timestamp field that is used by the log, despite Drupal documentation recommending datetime. | |
Feb 7, 2017 at 5:43 | comment | added | Yuseferi |
@KevinNowaczyk but it works, if you search in all core codes you didn't find any create('datetime') , this is correct way, please try it.
|
|
Feb 6, 2017 at 23:35 | comment | added | Kevin Nowaczyk | The 'created' fieldtype is an extension of a timestamp fieldtype with the added feature that it's default value is 'now'. Maybe what we've learned is the datetime fieldtype has no advantage over a timestamp, but does have disadvantages. | |
Feb 6, 2017 at 21:30 | history | edited | Yuseferi | CC BY-SA 3.0 |
added 157 characters in body
|
Feb 6, 2017 at 21:24 | comment | added | Yuseferi | @KevinNowaczyk, thanks for share your test module, I find your problem and update my answer, I hope it could help you. | |
Feb 6, 2017 at 21:23 | history | edited | Yuseferi | CC BY-SA 3.0 |
added 408 characters in body
|
Feb 5, 2017 at 22:50 | comment | added | Kevin Nowaczyk | I checked my new module a second time, and it was not working. (github.com/Beakerboy/drupal_test) | |
Feb 5, 2017 at 21:41 | vote | accept | Kevin Nowaczyk | ||
Feb 5, 2017 at 22:49 | |||||
Feb 5, 2017 at 21:39 | comment | added | Kevin Nowaczyk | Well that's just weird. I made a module with one entity, where the only field is a datetime field exactly as I had it defined in my actual module. The code works as expected in this one. | |
Feb 5, 2017 at 18:59 | comment | added | Yuseferi | @KevinNowaczyk I think with this snippet you can add this field as filter on your views and like other datetime fields choose a criteria for it. can you provide a screen shot of views filter or upload your module on git I clone and check it on my local ? | |
Feb 5, 2017 at 18:35 | comment | added | Kevin Nowaczyk | I don't know what to tell you. I checked the code, uninstalled, reinstalled, cleared cache and it's still the same. I always assumed that the 'view' section was how the entity list and display would treat the field, not Views. | |
Feb 4, 2017 at 14:10 | comment | added | Yuseferi | @KevinNowaczyk did you clear the cache? because we didn't use string type anymore | |
Feb 3, 2017 at 18:46 | comment | added | Kevin Nowaczyk | Nope, Views is still filtering as if it was a string. | |
Feb 3, 2017 at 16:18 | history | edited | Yuseferi | CC BY-SA 3.0 |
added 118 characters in body
|
Feb 3, 2017 at 16:13 | review | Low quality posts | |||
Feb 3, 2017 at 16:39 | |||||
Feb 3, 2017 at 16:12 | comment | added | Yuseferi | @KevinNowaczyk I update the answer, try that | |
Feb 3, 2017 at 16:12 | history | edited | Yuseferi | CC BY-SA 3.0 |
added 106 characters in body
|
Feb 3, 2017 at 1:33 | comment | added | Kevin Nowaczyk | The only thing that changes is the field's widget on the Entity addition page. It removes the ability to add a 'time'. | |
Feb 2, 2017 at 23:13 | review | Low quality posts | |||
Feb 2, 2017 at 23:18 | |||||
Feb 2, 2017 at 22:56 | history | answered | Yuseferi | CC BY-SA 3.0 |