Coder Social home page Coder Social logo

zooppa / administrate-field-date_picker Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 4.0 65 KB

📅 A plugin to pick a date in Administrate, with the help of Flatpickr

Home Page: https://github.com/thoughtbot/administrate

License: MIT License

Ruby 75.12% JavaScript 1.61% CSS 0.66% HTML 22.61%
flatpickr datepicker picker rails ruby

administrate-field-date_picker's Introduction

Administrate::Field::DatePicker

No Maintenance Intended Build status Code Climate


IMPORTANT NOTICE

This gem is not actively maintained anymore.

If you’re interested in taking over and steward the project moving forward, please get in touch.


A plugin to pick a date in Administrate, with the help of Flatpickr.

Screenshot

Usage

Add it to your Gemfile:

gem 'administrate-field-date_picker', '~> 0.3.0'

Run:

$ bundle install

Add to your FooDashboard:

ATTRIBUTE_TYPES = {
  bar: Field::DatePicker,
}.freeze

About

Administrate::Field::DatePicker is maintained by Zooppa.

See also the list of contributors who participated in this project.

administrate-field-date_picker's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar michelegera avatar neumayr avatar nickwarm avatar

Stargazers

 avatar  avatar

Watchers

 avatar

administrate-field-date_picker's Issues

Thank you :)

Thanks for this really useful addition to administrate, installed + worked like a charm!

Field views throw errors on empty parameter

ActionView::Template::Error (undefined method strftime' for nil:NilClass):
F, [2017-08-19T16:19:08.979464 #29988] FATAL -- : [78e30c33-81aa-49a9-879a-d10b356a03ec] 13: An instance of DateTime.
[78e30c33-81aa-49a9-879a-d10b356a03ec] 14: %>
[78e30c33-81aa-49a9-879a-d10b356a03ec] 15:
[78e30c33-81aa-49a9-879a-d10b356a03ec] 16: <%= field.data.strftime('%b %d, %Y') %>`

Add time support

Add the time picker (via flatpicker’s enableTime: true option) and add an option to the field to enable/disable it.

Since the most common use case is probably a date + time picker, allow opting out from the time part.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.