Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "michaelhilgers"

Any news ?

Hi,

I got some problems with the bootstrap datepicker. If I try the datepicker inside a component it worked. But If I used the datpicker inside a modal it doesn't work. If I change the date inside the modal the "changeDate"event wasn't triggered.

HTML

<div *ngIf="mitarbeiterJN">
                    <div class="form-group form-md-line-input no-hint">
                        <label>{{l("StartArbeitsverhaeltnis")}}</label>
                        
                    </div>
                    <div class="input-group date" data-provide="datepicker" data-date-format="dd/mm/yyyy">
                        <input id="datumArbeitsverhaeltnisBeginn" type="text" name="datumArbeitsverhaeltnisBeginn" class="form-control">
                        <div class="input-group-addon">
                            <span class="glyphicon glyphicon-th"></span>
                        </div>
                    </div>
                    <div class="form-group form-md-line-input no-hint">
                        <label>{{l("EndeArbeitsverhaeltnis")}}</label>
                        
                    </div>
                    <div class="input-group date" data-provide="datepicker" data-date-format="dd/mm/yyyy">
                        <input id="datumArbeitsverhaeltnisEnde" type="text" name="endeArbeitsverhaeltnis" class="form-control">
                        <div class="input-group-addon">
                            <span class="glyphicon glyphicon-th"></span>
                        </div>
                    </div>
.
.
.
</div>

Modal code

ngAfterViewInit() {
        $('.date').datepicker({
            weekStart: 1,
            format: "dd/mm/yyyy",
            todayHighlight: true,
            todayBtn: "linked"
        });

        this.setDatePickerArbeitsverhaeltnisBeginn();
        this.setDatePickerArbeitsverhaeltnisEnde();
    }

    setDatePickerArbeitsverhaeltnisBeginn() {
        $('#datumArbeitsverhaeltnisBeginn').datepicker().on("changeDate", e => {
            let day = e.date.getDate();
            let month = e.date.getMonth();
            let year = e.date.getFullYear();

            if (day > 0 && month > 0 && month < 13 && year > 1000) {
                let d = new Date(Date.UTC(year, month, day));
                this.newMitarbeiter.datumArbeitsverhaeltnisBeginn = moment(d);
            }
        });

        //$("#datumArbeitsverhaeltnisBeginn").datepicker('setDate', this.newMitarbeiter.datumArbeitsverhaeltnisBeginn.toDate());
    }

    setDatePickerArbeitsverhaeltnisEnde() {
        $('#datumArbeitsverhaeltnisEnde').datepicker().on("changeDate", e => {
            let day = e.date.getDate();
            let month = e.date.getMonth();
            let year = e.date.getFullYear();

            if (day > 0 && month > 0 && month < 13 && year > 1000) {
                let d = new Date(Date.UTC(year, month, day));
                this.newMitarbeiter.datumArbeitsverhaeltnisEnde = moment(d);
            }
        });

        //$("#datumArbeitsverhaeltnisEnde").datepicker('setDate', this.newMitarbeiter.datumArbeitsverhaeltnisEnde.toDate());
    }

Could you help me please ?

Thanks !

Yes, it was related to a record inside the language table !

Thanks !! :)

Befor I can try the timeout I need to remove the error with the $("#...").<span style="color:#FF0000">select2</span> ({ ...})

Visual Studio said Property 'select2' does not exist on type 'JQuery'

How can I remove this error ?

Angular2 - asp core

Hi,

I'd like using the dropdown from keenthemes like the first one here <a class="postlink" href="http://keenthemes.com/preview/metronic/theme/admin_4_angularjs/index.html#/ui_select.html">http://keenthemes.com/preview/metronic/ ... elect.html</a>

I included the select2 version 4.0.3 in the package.json. Then I added the select2.js and the select2.css in the angular-cli.json

So if I'm in my modals html I try to use it like this:

<div class="form-group">
                                        <label class="control-label col-md-3">Small</label>
                                        <div class="col-md-4">
                                            <select id="selectPreview" class="form-control select2me select2-bootstrap-prepend" data-placeholder="Select...">
                                                <option value=""></option>
                                                <option value="AL">Alabama</option>
                                                <option value="WY">Wyoming</option>
                                            </select>
                                            <span class="help-block">
                                                .input-small
                                            </span>
                                        </div>
                                    </div>

if I try to call in the modal ts file in the afterViewInit the

$('#selectPreview').select2
({
      placeholder: "Select",
      width: 'auto', 
      allowClear: true
   });
});

It doesn't know the select2 in jQuery

Could you help me please ?

Answer

Yes, I solved the problem.

Hi,

All unittests failed but I found the error...

The error was in the entity, it was an attribute on a property :roll: :

"[Column(TypeName = "NVARCHAR(Max)")]"

[Column(TypeName = "NVARCHAR(Max)")]
public string Name { get; set; }

Hi,

The server runs in a 64-bit mode.

If I commented out the line in the project.json VS created an .dll instead of the .exe from the EntityFramework project, and with the .dll it works fine.

The problem is that the EF isn't an dll

Hi,

I found the error. I could’t create the migrations file because I commented out the line

"buildOptions": {
    //"emitEntryPoint": true
  },

And the

public class program
    {
        public static void Main()
        {

        }
    }

in the EntityFramework project.

I did that because if I ran the unittest on the build server without comment out the line I got an error :

2017-01-24T10:32:38.2725042Z ##[error]Error Message: 2017-01-24T10:32:38.2725042Z ##[error] System.BadImageFormatException : Could not load file or assembly 'LignaSystems.PM.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. 2017-01-24T10:32:38.2725042Z ##[error]Stack Trace: 2017-01-24T10:32:38.2725042Z ##[error] at LignaSystems.PM.Tests.AppTestBase..ctor()

Do you have an solution for the problem ?

Unfortunately it isn't the error, I use the correct classname "public virtual IDbSet<CustomSettings.CustomSetting> CustomSettings { get; set; }" ( sorry I added an s when I pasted the code).

Can I try something to get you further information ?

Showing 11 to 20 of 25 entries