I need to override the datefield dropdown to show only the year, month but no date.
And on selection the field should set the date in format YYYY-MM since i just want to set the year and month values in date field like 2018-03 or 2018-04
here is the senchaFiddle
I just want the second image like dropdown(just showing the year and month) to show on the datefield dropdown without showing the dates
Month Year date field is shown as from #Alexander's answer in this fiddle.
Another option is using stock date picker with the monthPickerPlugin
ok ive just tried this and it worked greatly also for extjs4
here is the fiddle
Related
Hey Guys i have a case that i have 3 types of Date Pickers: Year, Quarter and Month and i need to edit the cells to add some value to it for example for Month is it possible with monthCellRender and with this i can edit the cells and add whatever i want on that cell, but can't find anything for Year and Quarter.
This is a link and the example how i did it for month and i want the same for year and quarter:
https://codesandbox.io/s/basic-antd4154-forked-8yhlv
You need to use dateRender:)
Example from documentation:
https://codesandbox.io/s/2hknl
UI date picker is showing incorrect date when, short date is selected from the format and any date in previous years like 1921 is selected, the date selected will be shown as in year 2021, ideally it should be shown as 1921.
Below is the official implementation, where it can be checked.
https://angular-ui.github.io/bootstrap/#!#datepickerPopup
Steps to reproduce.
Change Format dropdown to shortDate.
Select date as in year 1921 or 1962 etc.
The selected date year would be 2021 or 2062.
Does anyone has any idea about this. Is this a bug in plugin?
I think it's about how ui-bootstrap developers have designed the shortformat.
As you see, there is only 2 digit for the year. I think the two digit are for the actual century. You should open an issue on github and see what they reply.
I have an ExtJS datepicker where I disable some dates so the user can't select them.
After the calendar is renderer I send to the server the current date and the server sends back an array of days to disable, so the visual result is the following:
The problem I have is that I don't know the first and last day showed in the datepicker.
In this image the first day is 08/31/2014 and the last day is 09/11/2014. How can I get those dates, so I can tell my server to check if within that range I have to disable any date.
In the calendar example the "yellow marked dates" have to been disabled.
Any clue? Appreciate in advance.
Check this fiddle: https://fiddle.sencha.com/#fiddle/8ms
this uses minDate, maxDate with disabledDates, disabledDays combination..to enable particular days and disable all other days.
You could arbitrarily set the minValue to this month's first day and maxValueto this month's last day and then assume this on the backend side.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.Date-cfg-minValue
Here's how to get current month's first and last day
Get first and last date of current month with javascript or jquery
How do i force the sencha datepicker field to show dates only from current date. And not show the previous dates?
Thanks
As Rob said, its not possible because If i would disable the month january and februari (because it's march) and then proceed to select next year, january and februari should be enabled again. If i have to still achieve it, i have to solve it either programmatically or by validation.
I have a Window from that contains 2 date Pickers dtpFromDate and dtpToDate, I want to know how to validate that user selects From date the first date of selected month and To date is the last date of the same month.
From your description, having a months dropdown should be enough for your needs (though you may also require a years dropdown).
You can construct the first and last dates from that piece of information easily enough.
var fromDate = new DateTime(theYear, theMonth, 1);
var toDate = fromDate.AddMonths(1).AddDays(-1);