Code Monkey home page Code Monkey logo

lc-datepicker's People

Contributors

mematija avatar pivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lc-datepicker's Issues

Not compiling with angular version 4

Error Log : -
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,79): Cannot find name 'T'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,44): ';' expected.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,77): Expression expected.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,52): ';' expected.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,88): ';' expected.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,92): Expression expected.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,52): 'ObservableInput' only refers to a type, but is being used as a value here.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,68): Cannot find name 'infer'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,74): Cannot find name 'T'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,74): ';' expected.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (81,83): Cannot find name 'never'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,66): 'ObservableInput' only refers to a type, but is being used as a value here.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,82): Cannot find name 'infer'.
ERROR in systemPathnode_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,88): Cannot find name 'T'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,94): Cannot find name 'T'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/types.d.ts (82,98): Cannot find name 'never'.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/Notification.d.ts (7,12): In ambient enum declarations member initializer must be constant expression.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/Notification.d.ts (8,13): In ambient enum declarations member initializer must be constant expression.
ERROR in systemPath/node_modules/@libusoftcicom/lc-datepicker/node_modules/rxjs/internal/Notification.d.ts (9,16): In ambient enum declarations member initializer must be constant expression.

Enable the disabled timerange

I'm facing an issue where I have a start date-time and end date-time, where startDate should always be 1 minute less than endDate.

I have written a condition to add disable time range as below:

setEndDateOptions() {
    const today = moment().format();
    let startDate = this.startDateTime;
    this.endDateTimeConfig.MinDate = {
        date: moment(today).get('date'),
        months: moment(today).get('month'),
        years: moment(today).get('year')
    };
    if (startDate) {
        if (startDate.substring(0, 10) === today.substring(0, 10)) {
            const minTime = startDate.split('T')[1];
            this.endDateTimeConfig.addDisabledTimeRange('00:00', minTime);
        }
    }
}

So as per above code when startDate and endDate are same and if startDate is selected, disable all the time range from 00:00 till startTime. But if I go back and change the startDate to a previous date still the disabled time range is disabled.

I tried the below code which is throwing error:

// Cannot assign to 'DisabledTimeRanges' because it is a read-only property.
this.endDateTimeConfig.DisabledTimeRanges = [];

Please let me know how I can enable the disabled timerange.

User Experience-New Feature: Add an Input Field/Button...

Hi,
When I inserted the tag <lc-datepicker...> in my template, I would have expected an input field with the calendar button which is not the case.
When using your demo project, I just realized that I have to provide everything and interact with the visibility of your component via the property 'opened'.
It is a pain as I would have to create a component on my own that embeds this input field/button to not duplicate the code in every template.
is it possible to add this input field/button like in your demo project?
Thanks,
Serge.

Remove disabled years from the list

If I created config like

const config: DatePickerConfig = new DatePickerConfig();
config.CalendarType = ECalendarType.Date;
config.MinDate = { years: 1986, months: 1, date: 1 };
config.MaxDate = { years: 1987, months: 12, date: 31 };

it's totally unclear that all years from the 0 (and even -100500th year is still available) and till the 1000000000 are available in the year list. Also, this scroll is too hard for the touchpad on the laptop. Can you show only allowed years in the year list?

Add Calendar Position config

Can you add a element position config? It would be useful since there is situations like this one when it is at the end of a modal:
modal bug
This could be solved if there was a position config to 'top', per ex.
Thanks in advance.

The retuned date is wrong, when the current month has less days than the date selected.

Hi @mematija ! Nice component!

You can reproduce this behavior right on your demo page https://libusoftcicom.github.io/lc-datepicker/

How to reproduce:
The user's current month, must be a month with less than 31 days. (Now that I'm writing this is April, and April has 30 days)
If you select the date March 31st in the picker, the date the component selects (and returns) is March 1st.

How to fix:
In lc-datepicker.es5.js : function LCDayPickerComponent.prototype.dayClick
Swap the two lines

date.date(item.date);
date.month(item.months);

to be like this:

date.month(item.months);
date.date(item.date);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.