class Capybara::Playwright::Node::DateTimeInput

Public Instance Methods

set(value, **options) click to toggle source
# File lib/capybara/playwright/node.rb, line 299
def set(value, **options)
  if !value.is_a?(String) && value.respond_to?(:to_time)
    update_value_js(@element, value.to_time.strftime('%Y-%m-%dT%H:%M'))
  else
    @element.fill(value.to_s, timeout: @timeout)
  end
end