Eonasdan/tempus-dominus

v5 planning

Eonasdan opened this issue · 57 comments

This is just a placeholder for things we would like to accomplish in the next major release. We try to follow SemVer as:

  • Major: Breaking changes.
  • Minor: New features, but backwards compatible.
  • Patch: Backwards compatible bug fixes only.

Please feel free to comment with additional ideas or requests

Features

  • ViewDate/ViewMode time
  • TZ support (maybe) in v4.17.42!

Bugs

Enhancements

  • Move tooltip text to separate array in v4!
  • Decouple picker from input field, allow widget to be placed on any element (button)

Breaking Changes

  • FINALLY fix event namespacing
  • change show today/clear/close button option names to be consistent
  • depreciate nuget packages

Could we add a silent: true to any function that would emit an event? ex. .date(date, options)

@tsjoberg not sure what you mean. Can you expound?

Add ability to show/hide the current day marker. Currently it only displays if useCurrent: true

If you want to take it a step further add the ability to mark other dates, with an event we can bind to, to provide additional info/data.
dattimepicker-marked

could the markers inherit the styling bootstrap's label modifier classes (which are limited to background-color)?

Glad to see you're taking requests.

  • when linked pickers is used, the 2nd picker should automatically be filled with the value from the first. this will make it a lot easier to set the 2nd value relative to the 1st.
  • add a close/OK button option.

@GiraffeSlacks

  • while it doesn't do it automatically you can listen for the change event and set the date of the second picker
  • the dev branch has a close button feature already.

thanks for the suggestions

#879
A Library which is able to select multiple dates. ( Based on jQuery-UI Though) Don't know how much it will help.

http://multidatespickr.sourceforge.net/

z1m1n commented

How about IE8 support? Can be optional as additional file.
Thanks.

#879 @WhayP
bootstrap-datepicker has support for multiple dates
http://eternicode.github.io/bootstrap-datepicker

Here is a fiddle: http://jsfiddle.net/51cfb3sg/

the datepicker should be more responsive for usage on mobile devices. iam working on a PR for that

Nice would be a responsive full width dock on small devices like this:

unbenannt

Not forced binding to Input controls. A scenario is to bind the picker over knockut to a model property, open it via a button and show the model property value on a binded span.

A new View Mode "Week" would be very nice.
2503

Full width would be great ☺

Another request - some type of valid() to check if current selected date is a valid date (not within disabled dates)

timezone support will be nice

Could you make the normal change event trigger appropriately (and not be swallowed every time)? The problem with dp.change is that it triggers too often (even when the initial value is read from the input), and third party code that depends on the normal change event won't work with dp.change. (in my case this: https://github.com/yiisoft/yii2/blob/2.0.4/framework/assets/yii.gridView.js#L62)

Ideally the change event should trigger on input blur if the value is valid and when the datetimepicker is closed and the user selected a new value (clicked on a new value causing the picker to close, or changed the value and then closed the picker).

kbtz commented

@Eonasdan about the localization again, there's also some tooltips that doesn't relay on icons.
So it's probably a better decision to add locale support considering other strings that may coming in new features for v5.

+1 on Timezone Support

+1 on Timezone Support too!

Hello, I've got a suggestion: it would be nice to have an opt-in feature that would switch to the time picker inmediatly after a date is chosen, without having to press the clock button.

How about other Calendars support specially Hijri calendar for Arabic Saudi Arabia ?

I would appreciate a time viewMode so if a user is adjusting a date and time but they are more likely to only adjust the time we could default to that.

@munitras @amarjeet TZ support is planned

@MeLlamoPablo Being able to set the ViewMode/ViewDate to the timepicker is planned, however I'm not going to add a feature that will auto change/close the picker. There's just no go way to detect when a user is actually done picking the date.

@PaitoAnderson that's planned

@AboOmar I have no plans to support other calendar types at this time.

Can you give a really rough ETA?

Important notice: I've decided to depreciate the nuget packages!

I'll update them to the first v5 release. Beyond that, you'll need to use bower or npm. See #1128

I have got some suggestions (using it for a few days, and it's great):

  • time as a viewMode; when you have a range of a few hours, it would be nice to select the end in 1 click
  • automatically select hours when a day is chosen
  • set 00 to default time
  • display only quarter (00 15 30 60) or any values within a step (60/30/15/12/6/4/3/2/1) in minutes wheel.

(forget the last point, I have just discovered the stepping option...)

Thanks for taking requests. I use this plugin for various web applications but each of them would like to have a custom style as per the brand. Would it be possible to implement a way whereby we can have an easy approach to style the buttons and panel etc.? perhaps through a CSS hook?

  1. Mobile first design, provides full-screen pop modal in small screen, redesign the time picker, month/year picker UI to support slide/swipe gestures.
  2. AngularJS 1.x integration.
  3. Timezone support

@akhatri you can build the LESS file all day long. It imports the default styles from BS when we build it, but if you customized bootstrap you can build the pickers LESS file with your changes.

@hantsy TZ support is planned. There should be Angular directives in the docs or a link to it. I don't use Angular so I can't add it.

I spoke too soon. This already works. You just have configure using a moment.js format which looks something like: 'DD/MM/YYYY HHmm'

How about adding a 24h time entry mode? I imagine it would look something like:

24h-time-entry

I hope that I can set to send a global date format so for POST & GET, so regardless of the output format.

@Eonasdan

The output format for a ajax request is always the format from locale. Would be nice, i can set a unique value regardless of loaded locales.

@Fruchtgummi It sounds like you might be referring to something like #1168?

@kevin-brown

I had already tried with extraFormats, but doesn't work!

Here my Option:

$('.datepicker').datetimepicker({
locale: 'de',
format: 'YYYY-MM-DD LT',
extraFormats:['DD.MM.YYYY LT'],
});

MY HTTP-POST REGUEST

myArray[von]:2015-06-25 23:00 <-- why?

If extraFormats would have worked, would have to request it to be so:

myArray[von]:25.06.2015 23:00

Yeah, well, what's wrong?

+1 for a "week select" mode, as @balticSD said.

So you select a day and it actually highlights the whole week and sets the value to the start of that week.

And maybe even a "month select" mode.

Example, I use this library in a project to show all events for the selected date. But maybe they want to see all events for a certain week or month, etc.

Or perhaps it would be better to generalize this and say: give the ability to select a range. That'd be pretty cool. And then have a way to get the start and end.

Could you configure NuGet package so it will be installed in standalone directory or in bootstrap if exist, than in main Scripts directory like nowdays?

@netmajor the nuget packages are going a way. When .Net 5 goes RTM new projects will not be able to get content packages like this one via nuget. It's recommended to use bower.

Could use an event for clear. (dp.clear)

So when the clear button is pressed it would fire and allow us to do certain things like update an angular model for example.

@warrendodsworth the clear button fires dp.change which will have e.date = false

@Eonasdan Aha.. sry. Thanks for the reply.

I looked around the other issues and suggestion for a while, but was unable to find anything similar to this. I apologize if this is a duplicate and I overlooked an existing request.

Recently I've been working on a project that utilizes a program that expects dates in a single, very specific format, like 2014-04-24T23:16:05Z, where 'T' and 'Z' are just character literals. Currently I'm simply formatting the string as '2014-04-24 23:16:05', then inserting the 'T' and 'Z' characters before I send the string to my other program.

My feature request is to provide a way to natively insert literal characters into the format parameter. And example for this can be found in the first answer here.

Taken from the answer for convenience:

Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. "''" represents a single quote. All other characters are not interpreted; they're simply copied into the output string during formatting or matched against the input string during parsing.

"hh 'o''clock' a, zzzz" 12 o'clock PM, Pacific Daylight Time

Basically, can we render 'Z' as a literal Z, and 'd' as a literal d instead of day? The single quote format doesn't need to be the way it's done, we could do something like '\Z' like php.

Thanks for taking suggestions!

@luketaverne put the literal strings inside of []

@Eonasdan Ahhh, thank you! That works perfectly. Apologies for not seeing that elsewhere.

Date ranges for disabled/enabled dates.

Fantastic component!

I was just wondering if you could either change or add a different time selection mode. the other way is select from a clock as below.

image

There is already a clockpicker project that already does it.

I understand you don't want to copy peoples work, but I have a userbase that likes the clock but, I love the way your component includes both date and time selection.

Thanks!

@SKielty I'm actually working on that

I had a feeling you might be. With as involved as you have been in this project I figured you would want to do some cool HTML5 canvas work! Good luck and thanks a lot.

Is there an eta for this feature? Months? Weeks? Just trying to get a feel for my timing purposes.

Could you add bootstrap four support?

@shammancer dude.. BS4 is in Alpha! lol but yes, I will make it support bs4 :)

Figured it was a good of a time as any.

Here's mine:

  • timezone (as said earlier), and more precisely for me UTC (highest priority, maybe I will try to fork the project and do this for UTC)
  • stepping that allows a number of seconds (e.g. 10s) (second priority)
  • disable time ranges (for an agenda, where a time span is taken by another event) (optional, I can live without)

@jeremyVignelles

  • TZ is in the last version already :)
  • disabled time ranges is sort of already in.

@Eonasdan

  • I didn't see it in the docs, how do you force the usage of UTC? I tried to show the display of the timezone using 'YYYY-MM-DD HH:mm:ssz', but it doesn't seem to work
  • You mean that you can disallow the selection of full days? I think a good UX of disabled time range could be difficult to achieve : If I select today at 10:00 PM, what would happen if I switch to tomorrow if there is an event at 10:00 PM? It was just an idea, you can forget that

Please comment on #1337

I would love to see a two month display option like jquery ui datepicker has with its numberOfMonths option.