Base solution for your next web application
Open Closed

daterangepicker in arabic #3280


User avatar
0
avanekar02 created

Hello i am using a daterangepicker and the statement is as follows

<label>@L("Date")</label>
                        <input date-range-picker="" name="StartDate" id="StartDate" class="form-control date-picker ng-pristine ng-valid ng-isolate-scope ng-touched" type="text" ng-model="vm.coursedetails.startDate" options="{singleDatePicker: true}" required="" ng-class="{'edited':vm.coursedetails.startDate}">

it works fine if language is english but when language is switched to arabic it allows selection but when saves it keeps the date unchanged when updating i have checked the input on the form it is the new selected date but when it goes to appservice the input retains the old date when updation is called

please tell me how to overcome this please

regards Anwar


14 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @avanekar02,

    Do you click apply button after selecting new date range ? It works in that way, maybe you have missed that. You can compare your page with audit logs page.

    Thanks.

  • User Avatar
    0
    avanekar02 created

    Hello

    when i open the a data for editing it throws validation error, please note if i change the said date from datetimepicker it saves correctly but if i dont change the date and change any other field it throws this error. also note that the error is from date field only becuase when i commented the date statement in the update function it saves.

    also when i did a trace i noticed that the field that is tied to the ng-model if not changed shows value as system.datetime.

    thanks Anwar

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Does this work when you select any other language then arabic ? If so, can you send your project to us via email <a href="mailto:[email protected]">[email protected]</a> ?

    Thanks.

  • User Avatar
    0
    avanekar02 created

    yes, it works perfectly for english. brother

  • User Avatar
    0
    ismcagdas created
    Support Team

    Can you send your project to <a href="mailto:[email protected]">[email protected]</a> ? It will be faster to solve it like that I think.

    Thanks.

  • User Avatar
    0
    avanekar02 created

    i have sent my project code, main problem is i think date getting converted to arabic when saving what i mean is i need to set the date to arabic when the language is chnaged to arabic and data entered it saves , but when the same record is edited and dat field not touched and the edited record is tried to be saved it gives an error.

    i think when the record for the date to be edited is tied to the daterangepicker with the ng-model, it does display on the form but during save some perhaps error occurs .

    Regrads Anwar

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @avanekar02,

    Thanks for detailed explanation. I will try to fix your problem at the weekend.

    Thanks.

  • User Avatar
    0
    Hasan created

    I have the same problem as well

    Do you have a solution for this ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Hasan,

    This problem should be fixed on the AspNet Zero template. Can you show how do you use datepicker ?

  • User Avatar
    0
    Hasan created
    <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">@L("DateRange")</label>
                                    <input date-range-picker type="text" options="vm.dateRangeOptions" min="vm.dateRangeOptions.min" max="vm.dateRangeOptions.max" class="form-control date-picker" ng-model="vm.dateRangeModel"/>
                                </div>
                            </div>
    
    var todayAsString = moment().format('YYYY-MM-DD');
                vm.dateRangeOptions = app.createDateRangePickerOptions();
                vm.dateRangeModel = {
                    startDate: todayAsString,
                    endDate: todayAsString
                };
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Hasan,

    Is it possible for you to send your project to us (<a href="mailto:[email protected]">[email protected]</a>) ? We will check this problem for you.

  • User Avatar
    0
    Hasan created

    I have replied to your ID and also to this ID

    Let me know once it is done.

    Thanks

  • User Avatar
    0
    Hasan created

    Guys, i have asked this question for long and there is no reply from your side

    Is it done or not done?

    If it is not possible, let us know.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Hasan,

    We were very busy with our v5 release and it's problems. I will try to check your problem today.

    Sorry for the delay again.