Rails 7 #134 Date Range Picker
29/05/2023 (12 months ago)
Daterangepicker is an ultra popular library. Unfortunately, it depends on jQuery. Luckily, there is a re-write that uses vanilla JS: vanilla-datetimerange-picker.
Let's integrate DateRange picker into a Rails app and make search work!
Episode source code: https://github.com/corsego/134-daterangepicker-rails/commit/b03c27b23f288ddb93bba027d20b7e16c81a3784
Based on this blogpost: https://blog.corsego.com/datarangepicker-js-ransack
0:00 DateRangePicker demo
1:00 import DateRangePicker directly
1:49 store CSS and JS in correct locations
4:15 search form
6:20 search query
9:45 customize the DateRangePicker
0
Sign in to join the conversation
Recommended based on what you are watching now
07:26
Free Ruby on Rails #77 HACKERMAN: strong params authorization
09/05/2022 (about 2 years ago)
22:30
Free Ruby on Rails #04 Telegram API - omniauth without a gem
18/03/2021 (about 3 years ago)
screencast
09:31
Free Ruby on Rails #72 gem Rouge for code highlighting in Markdown
11/04/2022 (about 2 years ago)