Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [datepicker]

A datepicker is a user interface element in many frameworks that allows a user to choose a date and also, in some cases, time, often through a visual calendar.

0
votes
0answers
15 views

How can i only show date and month select box in calender(Magento 2)

I want my customer edit form calendar to be only date and month and no year and no week days name. This must include leap year as well if a user birthday is on 29th Feb and according to this current ...
0
votes
0answers
16 views

how to change getDateFormat() to only have date and month

So in my Customer edit form, I need to remove year , so on inspecting i found out the script code renders from vendor/magento/framework/View/Element/Html/Date.php code $html .= '<script type="...
1
vote
1answer
36 views

How to remove year dropdown from ui-datepicker Magento 2

How can i remove ui-datepicker-year from calender in Magento 2. I only want to make user select only date and month. How to achieve that. I have removed this line of code from jquery-ui.js if ( !...
1
vote
3answers
146 views

How to implement Time Range Picker in Magento 2 Admin system.xml?

I found one similar solution that almost does what I want. DateTimePicker System.xml I have implemented its code and was able to display a DateTime Picker in my admin configuration. However, I ...
2
votes
1answer
38 views

magento 2 custom calendar instead of core calendar

I want to create jalaali calendar (persian calendar) instead of magento core calendar for admin and front pages . for this purpose I've added these lines to my requirejs-config in my module : '...
1
vote
1answer
29 views

how to change magento 2 date.js form file

I want to change : magento/module-ui/view/base/web/js/form/element/date.js file and set my custom date file , for this purpose I've added this line to my requirejs-config in my module : 'map': { ...
3
votes
2answers
73 views

Disable date not working in magento 1.9 frontend

code: <script type="text/javascript"> // <![CDATA[ Calendar.setup({ inputField : 'shipping_arrival_date', ifFormat : '%m-%d-%Y', showsTime: false, button : 'shipping_arrival_date_trig', ...
1
vote
1answer
121 views

In magento 2 datepicker, how to disable a paritcular dates in frontend?

frontend 1.app/code/companyname/vendorname/view/frontend/web/template/delivery-date-block.html <label class="label">Delivery Date</label> <div class="control"> <input class="...
2
votes
1answer
70 views

Error Enter Valid date at cart price rule and save it db, after adding time in date picker in Magento 2.2.6

<?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> ...
3
votes
1answer
118 views

How to add a date picker recursively in magento2 admin form

How to add a date picker recursively in backend ? System.xml <field id="mapping" translate="label comment tooltip" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> ...
1
vote
1answer
206 views

Magento 2 UI Form datepicker, default date and strange behaviour

I created a UI Form with a datepicker field. In the XML I set required-entry to false. It keeps returning 'This is a required field'. In the XML the definition is thus: <field name="begin_datum"&...
0
votes
1answer
113 views

Magento 2 DateTime picker - Limit time selection range

I am using a datetimepicker on my frontend form with below code. I want to limit time selection between range 09:00 to 17:30 <input name="datetime_field" id="datetime_field" readonly title="...
0
votes
0answers
27 views

Datepicker issue in Magento 1

This is my js code: Calendar.setup({ inputField : '".$rowId."', ifFormat : '%d-%m-%Y', showsTime: false, align : 'Bl', singleClick : true, disableFunc: function(date) { ...
0
votes
0answers
173 views

create custom date field with calendar in Magento2

I created Custom customer attribute: <div class="field"> <label for="customdate" class="label"><span><?php /* @escapeNotVerified */ echo __('Custom Date') ?></span>&...
1
vote
1answer
486 views

Validate Date range in backend from in magento 2

I have added datepicker in magento2 backend form using following code. protected function _prepareForm() { $fieldset->addField( 'date_started', 'date', [ 'name' ...
0
votes
1answer
392 views

How to implement Single Date and Time Picker in Magento 2

Reference to Magento documentation, I want to implement "Single Date and Time Picker" mentioned in http://devdocs.magento.com/guides/v2.1/pattern-library/getting-user-input/date_time_selector/...
1
vote
1answer
141 views

Magento 1 datepicker issue selecting date for current month

This is my js code for my datepicker: Calendar.setup({ inputField : 'scheduled_ajax_update', ifFormat : '%d-%m-%Y', button : 'scheduled_ajax_update_trig', align : '...
0
votes
1answer
455 views

Magento 2.1 How to change member birthday date format

By default the date format is mm/dd/yyyy when new member register. How can I change the date format of birthday field to dd/mm/yyyy? I have tried to change locale to EN_UK, EN Canada, and also ...
0
votes
1answer
72 views

How to show time chooser in datepicker on magento configuration

I am trying to display time chooser in magento date picker but it didn't how up. can anyone please guide on this how to set timer in magento system confif. I have followed This Link but it show only ...
0
votes
0answers
251 views

Can't get datepicker value from custom checkout page

Im following this link to get datepicker value on my custom checkout page. Here is my code below. Test/Show/etc/events.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
842 views

Add date picker in checkout page

I tried to add date picker following this page. But when i open the checkout page, it's all just loading icon, and when i inspect the element, it's said error script on Test_Show/js/view/custom-...
2
votes
1answer
989 views

Magento 2 - Admin form datepicker not working in custom tab

I have a custom tab in admin customer account edit. I have two date fields but the datepicker is not working. Below is my code. <?php namespace Namespace\Modulename\Block\Adminhtml\Customer\Edit; ...
0
votes
1answer
424 views

Tried to implement the datetime picker magento2, but only date is coming

I have tried to implement datetime picker in Magento2, only date is coming, datetime picker is not appearing, $eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, ...
3
votes
2answers
2k views

How to convert Date format in magento 2?

I am getting date from system config using datepicker date format is dd/mm/yy I want to convert it in to yy/mm/dd H:i:s and able to convert date in format: yy/mm/dd but time is not coming.
2
votes
0answers
451 views

Magento 2 Datepicker in checkout using knockout js

I need a datepicker for every product item that i have in checkout. Below is my code for js file: /** * Copyright © 2013-2017 Magento, Inc. All rights reserved. * See COPYING.txt for license details. ...
3
votes
1answer
637 views

Date Time picker and time zone woes

I've got a custom datetime attribute on a product that allows a date AND time to be selected. The field uses the Magento Date picker with the time fields available. If I select a date and a time, ...
0
votes
2answers
2k views

Datepicker Options in Knockout JS Binding is not working

In my HTML frontend form, I have included a date picker using Knockout JS data binding. But the date picker options is not loading. I want my date format should be like "02-Dec-1991". I gave my HTML ...
0
votes
1answer
1k views

Magento 2 : Add Date Picker in 24 Hour Format in Admin Form

I want to add date picker in admin form which display 24 hour format. Currently , I select date then it will display like 4/25/17 5:21 PM But I want to display like this 2017-04-25 17:21:00 How to ...
0
votes
1answer
328 views

Issues with multiple date pickers in Magento 2

We are using two date fields in our template, as the first field is working fine but when we select the second field, the date is getting applied or changed to the first field. I am using below code ...
1
vote
1answer
139 views

How to show time in my text box also current month date i can't able to select

In backend i added date and time <script type="text/javascript"> // <![CDATA[ Calendar.setup({ inputField : 'shipping_pickup_at_store_date', ifFormat : '%d-%m-%Y', ...
0
votes
1answer
1k views

Magento 2: How to hide an HTML element in the checkout page?

I have a datepicker block on the checkout shipping step that I would like to be able to hide based on a condition. If the user doesn't qualify for a certain shipping method, I would like for the ...
2
votes
0answers
95 views

Special Order date picker that validates time frame before add to cart

I am fairly new to magento2 and I am working on developing a date picker that validates if a special order can be placed in time. The time frame would be different for each manufacturer on the site ...
3
votes
1answer
1k views

How to disable dates in Datepicker in Magento 2? [duplicate]

Using below I added the datepicker. I'm trying to disable the date smaller than what input field specifies but it enables picking any date older than input value. <script> require([ ...
2
votes
1answer
801 views

Magento 2: Disable past dates for the Datepicker built via ui-component

I am trying to add a validation to the datepicker so that users won't be able to select past dates. The datepicker is built via ui-component and the code snippet is as follows: I have checked this ...
1
vote
1answer
2k views

Magento 2 Add Datetime picker in system.xml

I want to add date picker with time in configuration section in my custom module. I followed Webkul link webkul link But from this I can only able to see date picker time picker is not appearing. ...
5
votes
2answers
6k views

How to add datepicker in magento 2 frontend form

I want to add a datepicker in magento 2 payment method form . Anybody have an idea how to add date picker through knockout js and data-bind in html page please help me on this ?
0
votes
1answer
107 views

Datepicker not working while creating special price

Whenever I am trying to create a special price for a product and try to select the from and to dates for the same the date is not getting selected at all, I have to enter it manually every time. How ...
1
vote
1answer
526 views

How to add a datepicker for a custom field from system configuration

I follower this tutorial. You can add easily fields as input text or dropdown, but in my case I want to add the magento datepicker. I have this function : public function _prepareToRender() { ...
1
vote
1answer
666 views

Magento 2 - time picker on backend (xml form)

I need to to have only time picked in the form. I have a field <field name="open"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> ...
0
votes
1answer
3k views

magento 2: How add time to datepicker in backend

I'am using magento 2.0.5 and I want to add date field with time which saves date as well as time in database for entity. I had tried this code to add new field in my module. $fieldset->addField('...
1
vote
1answer
2k views

Disable previous days in default Magento2 calendar

I have successfully added calender in my custom form by using below code. <script> require([ "jquery", "mage/calendar" ...
0
votes
1answer
1k views

adding calendar on form field in magento 2 not working error 404

In frontend I've managed to add a form that loads in a modal shown after a product is added to cart. On that form a field must have a calendar on. I've used the attribute data-mage-init='{"calendar": {...
4
votes
1answer
809 views

Magento 2 Pattern Library — Date & Time Selectors

I would like to implement the "Horizontally Stacked Time Range Picker" from the Magento 2 Pattern Library into an admin form input http://devdocs.magento.com/guides/v2.0/pattern-library/getting-user-...
2
votes
4answers
2k views

How can we disable past dates from date input field in admin?

I am using below code to add date field in one of the admin forms. $fieldset->addField('newsletter_date', 'date', array( 'label' => Mage::helper('masters')->__('Send At'), 'class'...
0
votes
2answers
338 views

Magento admin form date widget week number differs from jquery UI week number

For a project I am working on we need to know the week number which is displayed via a date form field widget in the admin section. On the front end we also show the week number but we are using a ...
1
vote
1answer
1k views

How to save date in database from frontend?

I want to add birthdate from frontend form using datepicker phtml code: <div class="field"> <label class="required" for="birthday"><em>*</em><?php echo $this->__('...
0
votes
1answer
75 views

Model _beforeSave observer can't save time

Synopsis I have a date field in my admin form but when I save this date & time, I then have an observer that runs on my model _beforeSave which corrects the format for MySQL. Although in the ...
0
votes
1answer
3k views

Magento Calender with onSelect event

I am trying to capture magento's calender date-select event, haven't found anything about any where, but I already know magento is using jQuery UI calender so I looked into jQuery UI documentation and ...
3
votes
1answer
940 views

How to solve date and time problem in magento? [closed]

I am using datepicker in magento form This is my code: $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); $fieldset->addField('...
6
votes
2answers
4k views

Add datepicker on frontend?

We have developed a custom module for appointment. We need to get date of the appointment. We have added the below code in my custom page xml and phtml files In XML file: <reference name="head"&...