I've developed a website in Sinatra, but at the last minute I've been told it will need a form with a datetime field (for an Activerecord object). In Rails I would just use the datetime_select helper to construct this field in the view, but I'm having trouble finding a library or extension that provides similar functionality in Sinatra. I could always roll my own, but I'm sure someone has encountered this problem before and probably has a better solution. Any suggestions?
datetime_select in Sinatra
968 Views Asked by Steven Cummings At
1
There are 1 best solutions below
Related Questions in RUBY
- Best way to make an HABTM association via console
- undefined method `namespace' for main:Object (NoMethodError) - active record / rakefile
- Ruby destroy is not working? Or objects still present?
- Trying to set the value of an input with mechanize
- How to split the logic in a ruby game
- How can I monitor an endpoint's status with Ruby?
- Why can a private class method be explicitly invoked in Ruby?
- Rails - Ajax do not work properly on production server
- syntax error, unexpected kEND
- Carrierwave file upload with different file types
- b.javascript_dialog().exists? is not working for me in WATIR 4.0.2
- Combine two arrays of hashes
- Building a simple calculator form in Rails 4
- How do I update create route from rails 3 to 4
- Comparison of Fixnum with nil failed - palindrome program Ruby
Related Questions in DATETIME
- Python datetime.now() with timezone
- Create a list of sequential monthly dates in PHP given initial date and quantity
- DataTable RowFilter on Time component of DateTime column
- Joda DateTime Json date format issue
- how to create folder and file with datetime in wpf application
- String concatenation with padded integers
- What is the correct DateTime format in WebSQL to perform date comparison queries?
- how to get the time interval of a date and a datetime displayed as day,hour, min,seconds in sql
- DateTime.Now.ToString("HH:MM") allways gives 20:06
- How can I get the ctime and/or mtime of a file in Python including timezone?
- add time (char(8)) to date column
- MyBatis cannot work with joda DateTime?
- PHP Fatal error: Call to a member function format() on boolean
- Use DateTime format in a class but restrict time tokens
- Modify records to account for correct priority and order between two systems
Related Questions in SINATRA
- Access Padrino settings from controller
- sinatra start as daemon programmatically
- In Padrino, where does access_control come from?
- Lots of H17 Heroku Errors
- Symlinking unicorn_init.sh into /etc/init.d doesn't show with chkconfig --list
- Selenium isn't catching JavaScript errors
- How to write portable image paths in CSS files for a mounted sinatra app?
- RSpec - testing multiple expectations across routes
- Sinatra/Ruby DynamoDB get_item returning '#' sign instead of integers
- DataMapper Error with Models(`fetch': key not found: :precision (KeyError))
- Passing in API Key and Parameters with RestClient
- Securing Angular Application
- Datamapper "Model.all()" method creates 3 selects and not selecting the right fields
- Rendering one ERB page into another using Ruby/Sinatra/AJAX
- Creating a Ruby API
Related Questions in DATETIME-SELECT
- SQL to_char() | Convert minutes into a string of size 2
- datetime_select in Sinatra
- form_for with datetime_select
- python 2.7 how to read in dates
- Limiting datetime_select to a certain start time
- rails refreshing date in datetime_select option
- MySQL average number of hours between created datetimes for a specific time interval
- datetime_select not displaying in utc
- Ruby on Rails time_select plugins?
- How to match daily data from monthly using Matlab?
- f.datetime_select remove previous dropdown dates
- Using accepts_nested_attributes_for in rails with datetime
- Rails 3: datetime_select with am/pm options
- How can I modify the input type of the Rails datetime_select helper?
- An alternative to useing datetime_select in Rails
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Although Rails may have a method for this (what doesn't it have a method for?) this doesn't seem like a question in the domain of Sinatra. It sounds like you're asking how to create a custom HTML+CSS+JS widget, which is separate from the server-side code.
Unless I'm misunderstanding your question, it seems like this question is appropriate:
jQuery Date/Time Picker