Git Product home page Git Product logo

Comments (22)

jdtcn avatar jdtcn commented on June 16, 2024

You want to automatically open the picker on a page load?

If so, then do this in your page code:

<DateRangePicker @ref="DPRef"/>

@code{
    DateRangePicker DPRef { get; set; }

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        await base.OnAfterRenderAsync(firstRender);
        if (firstRender)
        {
            DPRef?.Open();
        }
    }
}

It'll be possible after update to a preview9 version of a library, I'll publish it tonight.

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

Thanks it working but after click on any ware automatically closed, can u give suggestion for that

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

how to find the date

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

To disable autoclose on outside click you must delete body of InvokeClickOutside function in DatePickerComponentBase.cs file.

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

Ok, there is CloseOnOutsideClick property in 1.0.0-preview9-02 version, just:

<DateRangePicker CloseOnOutsideClick="false"/>

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

Yeah its working but some bugs there
1.Overwrite the App Bar
2.Dialog box also not shown fully

can you try inline function like other date picker, and also one more request can use single calendar instead of two calendar
image
image

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

Also its overwriting with nearest component
image

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

To show only one calendar (1.0.0-preview9-03):

<DateRangePicker ShowOnlyOneCalendar="true"/>

Layout issues probably caused by your css styles. You can create sample repo, I'll look into it.

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

after this also showing two calendar

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

Are you updated dependency to 1.0.0-preview9-03 version?

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

Yeah i updated already

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

Share the code, I'll see

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

<DateRangePicker style="width:100%" ShowOnlyOneCalendar="false" CloseOnOutsideClick="false" @ref="DPRef" StartDate="StartDate" EndDate="EndDate" OnRangeSelect="OnRangeSelect" @OnClick="@(()=>GetTimeOffsbyDate(StartDate))">

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

You've mistaken: ShowOnlyOneCalendar should be true, but it's false in your code. Also, consider using OnOpened event instead of onclick handler.

And use markup for code insertions, because @ will call users with names ref and OnClick in our discussion.

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

thanks ,
Can Write the action for apply button

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

OnRangeSelect triggered when the apply button is clicked.

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

thanks

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

Its possible to change the over write on other component

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

https://user-images.githubusercontent.com/9216348/64759363-85301200-d554-11e9-82f8-f3d0df0db160.png
https://user-images.githubusercontent.com/9216348/64759933-1c499980-d556-11e9-8489-cad47080bf1e.png
image

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

Sure, just modify z-index properties in your site css either for this picker or for your modal.

from blazordaterangepicker.

novfal avatar novfal commented on June 16, 2024

how display date like 12-Aug-2019

from blazordaterangepicker.

jdtcn avatar jdtcn commented on June 16, 2024

There is a property named DateFormat for such purpose.

<DateRangePicker DateFormat="dd-MMM-yyyy"/>

Date format docs

from blazordaterangepicker.

Related Issues (20)

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.